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 / Why doesnt this work?

Author
Message
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 10th Mar 2003 19:20
when I remove the "Hoop2Passed=0" bit it works fine. why? (its a variable I define earlier in the program btw)

If object collision(1,2) and Hoop2Passed=0
set cursor 0,15
Print "Hoop Passed Successfully!"
Inc HoopsPassed
Hoop2Passed=1
Endif
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Mar 2003 19:52
Without seeing the rest of your code it is hard to say what is wrong here, certainly there is no structure issue in the snippet provided.

You could try double nesting:


Or you could try monitoring the variables involved by texting them to the screen just before the sync.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 10th Mar 2003 20:00
Well ill post the rest of my code, nesting them didnt work. Ignore the fact the object is a gun, its just an object im using to test collision. Also is there a reason that my while loops didnt work? Ive Remmed them out for now but I hope you can tell me what is wrong.

Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 10th Mar 2003 20:01
Sorry there was some unnecessary code I should have removed in there. It didnt work for what I needed.

Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 10th Mar 2003 22:27
I think this could be a bug or something. I changed the variable Hoop2Passed=0 to HooptwoPassed=0 and it works now. Why doesnt it accept a number in the variable name?

Login to post a reply

Server time is: 2024-09-19 23:11:16
Your offset time is: 2024-09-19 23:11:16