Thread: Learning GS2 :D
View Single Post
  #12  
Old 09-01-2006, 08:18 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
there are a couple of minor problems with your code there, problems that will stop it executing the way you expect it to.

PHP Code:
...
if (
this.value 0); //here
this.value 1;
player.chat "On!";
}
else {
... 
Firstly, after an if should be a { not a ;.
Secondly, comparision is done with == not =.

= is used to set values and can be read as "becomes". == can be read as "is equal to", so that line of code should be this:
PHP Code:
if (this.value == 0) { 
__________________

Coming soon (Hopefully:P)
Reply With Quote