| Blockland Forums > Modification Help |
| Parent::onSpawn(); Errors |
| << < (3/3) |
| Greek2me:
You have a ; at the end of function GameConnection::spawnPlayer(%client); Remove it. Also, that needs to be packaged. |
| jes00:
--- Quote from: Greek2me on October 16, 2011, 03:29:17 PM ---Also, that needs to be packaged. --- End quote --- It is, I just did not include it. EDIT: It still says the G is an error. DOUBLE EDIT: Duh I forgot to open the package with a { TRIPLE EDIT: Now it says the following is a syntax error: --- Quote ---//========================================================================= // Spawning //========================================================================= function GameConnection::spawnPlayer(%client) { %this.setEnergyLevel(0); serverCmdDisplay(%this); schedule($DesertMod::Pref::ThirstRate, 0, Thirst, %client); %obj.changedatablock(DesertPlayerArmor); Parent::spawnPlayer(%client); } //========================================================================= // Raise thirst //========================================================================= function Thirst(%client,%Player) { %client.addEnergy(-1); schedule($DesertMod::Pref::ThirstRate, 0, Thirst, %client); if(%client.player.getEnergyLevel() == 100) serverCmdSelf Delete(%client); messageAll('', "<color:FFFF00>" @ %client @ "<color:ffffff> Has died of thirst!); } --- End quote --- |
| Mawpius:
You're missing a quotation in the messageAll. I'm sure you could have found that by yourself. |
| Greek2me:
Always check the line above when it puts syntax errors in random places. |
| Navigation |
| Message Index |
| Previous page |