| Blockland Forums > Modification Help |
| New player list |
| << < (2/12) > >> |
| Space Guy:
Does the player list protection also happen clientside, then? |
| Iban:
--- Quote from: Kalphiter on February 27, 2011, 05:56:21 PM ---Bold is causes a syntax error. --- End quote --- Oh boy Kalphiter's here to question my scripting prowess. I just ran the script and it does not contain syntax errors. Using no curly braces with if/else ifs is perfectly valid and I utilize it often. --- Code: ---// Fetches a player's profile (creating it if nessicary). // @ProfileSO function GameConnection::getProfile(%client) { if(!Profiler.isProfileActive(%client.bl_id)) if(Profiler.isProfile(%client.bl_id)) if(Profiler.loadProfile(%client.bl_id)) return Profiler.getProfile(%client.bl_id); else return -2; else if(Profiler.createProfile(%client.bl_id)) if(Profiler.loadProfile(%client.bl_id)) return Profiler.getProfile(%client.bl_id); else return -2; else return -1; else return Profiler.getProfile(%client.bl_id); } --- End code --- Learn your place. I'll give you a hint if you can't find it: It's under me. |
| Kalphiter:
--- Quote from: Iban on February 27, 2011, 06:00:31 PM ---Using no curly braces with if/else ifs is perfectly valid and I utilize it often. --- End quote --- A shorthand if, or any statement, can only have one statement for that block. This is Torque's fault, such a standard practice ruined. |
| Space Guy:
==> if(false)echo("no");else echo("iban is right"); iban is right I too use this all the time. |
| Kalphiter:
--- Quote from: Space Guy on February 27, 2011, 06:11:39 PM ---==> if(false)echo("no");else echo("iban is right"); iban is right I too use this all the time. --- End quote --- That wasn't what he did, though. He did this: --- Code: ---if("namfe" $= "name") if(644 == 644) echo("guy's name is name and blid is 644"); else echo("this guy isn't name"); --- End code --- But in theory, it should be executed like this: --- Code: ---if("namfe" $= "name") { if(644 == 644) { echo("guy's name is name and blid is 644"); } } else echo("this guy isn't name"); --- End code --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |