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 / Variable does not exist in program?

Author
Message
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 18th Feb 2006 00:54
When I try to run my program it says "Variable 'CurrentTurn' does not exist in program". I didn't know that you had to declare variables in Darkbasic at all, except arrays. But I did declare it the beggining. The only thing that I thing that might do it is that it says variable 'currentturn', but it's an integer. but any help?
Just in case you don't get it, here's my code-

(You need media to run it, but hopefully you can just see the problem if you read it... hopefully)


LIGHT FRENZY (almost done!)
Best Noobish game ever.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Feb 2006 04:37
It's because of this typo: "c_turn=c_turn(1)+1" (line 146). It wants an array dimensionalized because of the "(1)".


Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 18th Feb 2006 14:39
Whoa... I didn't see that, Thank you.


LIGHT FRENZY (almost done!)
Best Noobish game ever.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Feb 2006 20:18
Np.


Login to post a reply

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