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

Author
Message
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 26th Dec 2009 22:59 Edited at: 26th Dec 2009 23:02
ok i have just started a new program and i have come across a very unusual problem, i declare my type then i edit my type and then i print a variable from that type, but it says that the variable type doesnt exist, see for yourself..



does this run for you??

thankyou

EDIT: Strangely when i change Alien to an array it works, wats going on here..
MummyKillerSLO
15
Years of Service
User Offline
Joined: 5th Jul 2009
Location: Object Position Y(ObjChair)
Posted: 27th Dec 2009 00:12
If I move UDT part of code outside label then program works.

Here it is, what I done:


Happy to having and using DarkBASIC Professional...
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 27th Dec 2009 00:19 Edited at: 27th Dec 2009 01:07
yes it does, strange but im going to be moving things around alot and i need the udt in the sub

its always worked before??

EDIT: I have decided to dim it as Alien(0), that works so does global
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 27th Dec 2009 02:47 Edited at: 27th Dec 2009 04:08
ok now thats weird, i dont have to dim it or global it or move it and it works BUT theres another problem



it generates a name the first time but every other time it shows up as r, im off to a really bad start here????

EDIT: I found out that its because when i press space to generate a new name it adds the space to the input, i fixed this by adding a wait command just after 'if spaecekey'

Login to post a reply

Server time is: 2024-11-24 20:27:26
Your offset time is: 2024-11-24 20:27:26