#### Archived

This topic is now archived and is closed to further replies.

# HELP!!!

This topic is 6237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

what is wrong with this code!!!!
  if(keys['S'] && !sp) { sp = true; spin = !spin; } if (!keys['S']) { sp = false; } if(spin = false) { // Slow Down if not in spin mode if (xspeed > 0.0) { xspeed -= .0005; } if (yspeed > 0.0) { yspeed -= .0005; } if (xspeed < 0.0) { xspeed += .0005; } if (yspeed < 0.0) { yspeed += .0005; } } xrot += xspeed; yrot += yspeed; 
if in spin mode, it countinously spins, if spin is false it has to slow itslef down, simple as that! but it wont work. Edited by - DarkHunter on November 18, 2001 7:31:54 PM

##### Share on other sites
It should be (spin == false).

##### Share on other sites
One of the oldest and simplest problems from the looks of it:

if (spin = false)

should be

if (spin == false)
or
if (!spin)

easy mistake to make - hard to spot!

EDIT:

Fruny - you beat me to it by 59 seconds!

Edited by - Enigma on November 18, 2001 7:35:50 PM

##### Share on other sites
Well, since you aren''t saying how exactly it isn''t working, I can only guess that your problem is
if(spin = false)

This should be spin == false. (assuming you just copy/pasted it and didn''t make a mistake typing in your code here)

##### Share on other sites
I FEEL SO DUMB! thx

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633736
• Total Posts
3013603
×