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.

DarkBASIC Professional Discussion / need help positioning object variable#, mousex, mousey, 0

Author
Message
AJ Schaeffer
16
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 7th Aug 2010 05:36

i get an error with this code. im trying to make a level maker so to spawn a storage_c, it looks like this


(storagec# starts out at 9000)
not sure y this wont work though
any ideas?

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Aug 2010 15:46
Storagec# is set up as a float variable, when it should be an integer. Rename it to storagec.

And in your keystate code, you clone the object and set it's id to be storagec - 1. Since storagec and storagec# are two separate variables, you're essentially using the same object id all the time. Again, remove the # from the variable name.

My signature is NOT a moderator plaything! Stop changing it!
AJ Schaeffer
16
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 7th Aug 2010 20:32
i still get an error here


Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 7th Aug 2010 20:37 Edited at: 7th Aug 2010 20:38
mousex and mousez are functions. You can't use them as variable names.

Edit: Perhaps you knew that. Call them by adding empty parentheses after them: mousex()

Login to post a reply

Server time is: 2026-07-25 12:05:19
Your offset time is: 2026-07-25 12:05:19