| Blockland Forums > Modification Help |
| My scripting problems: 0 |
| << < (14/14) |
| Pew446:
--- Quote from: devildogelite on June 12, 2010, 01:51:18 AM ---It is closed, theres a bracket right above the one you added. --- End quote --- Let me put this in better detail: $specialmode = 0; function serverCmdSpecialmode(%client) { if ($specialmode==0) { messageAll('', "Special Mode has been turned \c3ON."); $specialmode = 1; } else { messageAll('', "Special mode has been turned \c3OFF."); $specialmodet = 0; } //Comes up with syntax error here - I have checked } |
| Sammygood:
Ok then. Crysist, it would not be needed to put "if ($specialmode==1)", because there is an else there. And even if you did put it there, it would not work since it is "==1" not "==0", then it would just go on then instantly go off. Edit: Ignore |
| Pew446:
Heres another problem: function serverCmdSpecialmode(%client) { if ($specialmode==0) { messageAll('', "Special Mode has been turned \c3ON."); $specialmode = 1; } else { messageAll('', "Special mode has been turned \c3OFF."); $specialmodet = 0; } //Comes up with syntax error here - I have checked } |
| Sammygood:
That wasn't in my script, i must have accidentally put it there when posted. OK, problem solved. |
| Pew446:
--- Quote from: Sammygood on June 12, 2010, 08:32:47 AM ---That wasn't in my script, i must have accidentally put it there when posted. OK, problem solved. --- End quote --- Ah. Well good for you! :D |
| Navigation |
| Message Index |
| Previous page |