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 at line X

Author
Message
MONSTER MARK
14
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 31st Aug 2011 12:11
I am facing this error
" Variable 'boundary' does not exist at line 21."





i have declared left,right and others as a variable:




and later called MakeBndy() as



and nextobjID as:






basically i want to create a boundary sort of box at the edge of my screen.

Judgment Day Can Wait !!
MONSTER MARK
14
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 31st Aug 2011 12:24
have a look at the whole code..




i think i've messed up with variable 'boundary' or left,right...


kindly reply
Thanks..

Judgment Day Can Wait !!
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 31st Aug 2011 14:08 Edited at: 31st Aug 2011 14:14
Im just looking real quick,, and I'm tired, so please excuse me if I missed it. But two things I notice.

Global bounbary as Collision

should be boundary


Out of habbit I also do all my declarations of any types & variables, even if globals before I start assigning them values. In your code you start assigning values to boundary before the Global declaration of boundary. I'm assuming DBpro allows and handles this... I just never trust it to.

[edit]Just saw the gosub a the begininning. So that sort of nullifies my statement about it coming before the declaration. But in either case, I like to keep all my types at the top. =)

Your signature has been erased by a mod please reduce it to 600 x 120.
MONSTER MARK
14
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 31st Aug 2011 14:49
thanks mate.. that was typo..


thanks for the quick reply...

Judgment Day Can Wait !!

Login to post a reply

Server time is: 2024-11-27 19:20:39
Your offset time is: 2024-11-27 19:20:39