| Blockland Forums > Modification Help |
| Return and Else Scripts |
| << < (5/5) |
| Gordo12699:
--- Quote from: Headcrab Zombie on June 10, 2012, 12:30:13 PM ---Now here's a pet peeve of mine Lesson 1: What the term syntax means. It's basically the structure of arranging your code; like grammar. If you say your code has no syntax, it wouldn't make sense at all. The term you're looking for is syntax error --- End quote --- Sorry bout dat I'll try the code right now, and thanks for the else part! |
| Ipquarx:
Try this: --- Code: ---// When the players gets killed function GameConnection::onDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc) { Parent::onDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc); if(%client.isAdmin) { // Message about Stats messageClient('', "<color:ffffff>Your stats have been preserved because you are admin."); %client.RPData.value["tools"] = ""; return; } // Lose tools and Clear Stats if(!isObject(%client) || !%client.isInRP()) return; %client.RPData.value["tools"] = ""; %client.RPData.clear(); } --- End code --- I fixed up the code like I said to earlier, on that last if statement And lugnut, where did you get the idea that a space after if makes any sort of difference? Because it doesn't make any difference. |
| Lugnut:
--- Quote from: Lugnut1206 on June 10, 2012, 12:32:15 PM ---I didn't think it did, I was trying to be safe rather than sorry --- End quote --- |
| Navigation |
| Message Index |
| Previous page |