Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / school project - math testing program

Author
Message
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 10th Mar 2006 03:57
hey guys!
We are having a science fair and i am making a math program for 1st graders.
I have run into a problem. I need my program to message the user if their answer is wrong.
Currently all it does is give random problems. PLEASE help me, i just need a message to come up if their answer is wrong. here is my code:



thanks in advanced,
~Snowfall

Hoose
18
Years of Service
User Offline
Joined: 15th Feb 2006
Location: Lost in the corners of my Mind!
Posted: 10th Mar 2006 04:18 Edited at: 10th Mar 2006 04:37
Could you post the "gui.dba" file as well. I'll look it over later tonight and see if I can help. Also are you using DBC or DBP?

Hoose
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 10th Mar 2006 04:42
Im using DBP, but you need Bluegui to run it. i cannot post the DBA im affraid. if you had bluegui it comes with it

Hoose
18
Years of Service
User Offline
Joined: 15th Feb 2006
Location: Lost in the corners of my Mind!
Posted: 10th Mar 2006 07:40 Edited at: 10th Mar 2006 07:42
Ok, I have a couple places for you to look. I can't really debug it since I don't have Bluegui, but I will try to help anyway. The only things I noticed were:



Wondered why you are using a real number varible if your addition varibles are interger, since they could not ever end up with a decimal. Don't think it has anything to do with what your asking but just something I noticed.

And:


Possibly, after the True condition of eventSource(), there should be a ELSE statement in between the last two ENDIF's in case of a false condition.

Best I can do I'm afraid since I am unfamiliar with Bluegui. Hope this helps.

Hoose
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 10th Mar 2006 16:32 Edited at: 10th Mar 2006 16:39
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.



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!!!

Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 11th Mar 2006 02:51
Somone please help me!!!!

Hoose
18
Years of Service
User Offline
Joined: 15th Feb 2006
Location: Lost in the corners of my Mind!
Posted: 11th Mar 2006 04:17 Edited at: 11th Mar 2006 04:42
Why does getgadgettext have to be a string? Why can't it be:



In fact it should be since later in your code you have:



And I should have been more specific with the ELSE statement. Here is some sample code. Maybe you can work this backwards into your program since functionality wise it works. You can pretty it up from there with your graphical interface.



See if those get you any closer.

Hoose
kyle thompson
18
Years of Service
User Offline
Joined: 9th Mar 2006
Location:
Posted: 11th Mar 2006 19:36
Hoose84:
Your code is a bit messed up. I fixed it though. Just one simple problem.


Hi
Hoose
18
Years of Service
User Offline
Joined: 15th Feb 2006
Location: Lost in the corners of my Mind!
Posted: 11th Mar 2006 23:13
It will run without the "else" in it since it's assumed. But I should have left it and the comment files in it for clarity. Thanks! =)

Hoose

Login to post a reply

Server time is: 2024-09-24 17:38:22
Your offset time is: 2024-09-24 17:38:22