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.

Dark GDK / Identifier Not Found!!!

Author
Message
Cooldude
16
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 25th Nov 2007 20:14
I'm trying to make a physics system that pushes a sprite down and when it collides with grass it goes up 32 pixels to be just above the grass. When I go into my loop and enter my ints like iY, iGrassY it tells me that the identifier is not found!!! Can anyone help?? Here is my Code:



IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Nov 2007 21:24
First, you are defining the same set of variables twice - the ones in the loop are completely different to the ones outside the loop, and they'll get reset every time.

Next, you are using a variable called GrassY - from your code, it should be iGrassY

Then you are using an assignment in one of your 'if's - single equals means 'assign', double equals means 'compare'.

Finally, just changing the variables won't move the sprite - that seems like the effect you are hoping for in that code. You need to use the dbSprite function to move the sprite.

Here's what I think you are after:


Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Cooldude
16
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 26th Nov 2007 00:46
Thanks IanM!!!
My Program Works now.

Login to post a reply

Server time is: 2024-09-29 05:24:16
Your offset time is: 2024-09-29 05:24:16