hmmm, didnt change anything
Everyone else,
when i use "getgadgettext" it needs to be a string, but i want it to be if canswer = YourAnswer then end (just for a test)
if it has to be if caswer = YourAnswer$, which DBP wont accept!
please help me, i want it to be able to do something if the user is right.
Rem Project: SCHOOL_PROJECT_INVENTION
Rem Created: 3/9/2006 5:39:42 PM
Rem ***** Main Source File *****
#include "gui.dba"
startBlue "---","------"
Button=createButton(700,500,120,25, "Recieve Problem",0,0)
AnswerOkay=createButton(700,650,75,25, "Okay",0,0)
answerArea = createedit(700,550,100,25,0,0)
right = 0
total = 0
Do
YourAnswer$=getgadgettext(answerArea)
set cursor 0,0
print right,"/",total
if escapekey()=1 then end
getEvent
if eventSource()=Button
if eventType()=MOUSE_CLICK
CLS
num1 = rnd(50)
num2 = rnd(50)
set cursor 570,400
print num1," + ",num2
Canswer = num1 + num2
endif
endif
if eventSource()=AnswerOkay
if eventType()=MOUSE_CLICK
CLS
total = total + 1
if canswer = YourAnswer then end
endif
else
endif
Loop
EDIT: like some way to convert a string to an integer. Or save the file as something then open it and read it and save it as a number.
PLEASE HELP ME!!!