| Blockland Forums > Modification Help |
| Army RP Organization Mod - To make Army RPs and Military RPs less stuffty! |
| << < (8/8) |
| Mr. Wallet:
you need colons after each case, e.g.: --- Code: ---case "Private": --- End code --- |
| PVC Potato Gun:
--- Quote from: Mr. Wallet on August 12, 2011, 03:55:13 PM ---you need colons after each case, e.g.: --- Code: ---case "Private": --- End code --- --- End quote --- And here I though it wasn't the case, since I hat to remove semi-colons. --- Code: ---Executing add-ons/class_work/Gamemode_ArmyRP.cs. add-ons/class_work/Gamemode_ArmyRP.cs Line: 22 - Syntax error. >>> Some error context, with ## on sides of error halt: %target = findClientByName(%targetEntry); if(!isObject(%target)) //a name wasn't entered either, so we'll stop the function { return; } } switch$(%rank::entry) { case "Private": messageclient(%target,'',SPC ##"##rank has been set to" SPC %rank::entry); %target.rank = %rank::entry; echo(%rank::entry); case "Private 2": messageclient(%target,'',SPC "rank has been set to" SPC %rank::entry); %target.rank = %rank::entry; >>> Error report complete.code] --- End code --- |
| Mr. Wallet:
You can't start or end a string with a concatenation operator (@ SPC TAB NL) |
| PVC Potato Gun:
Syntax errors gone, but now my script keeps using the default case... |
| PVC Potato Gun:
Progress, everything is working, except it does not show the target's name. I'll need to find a way to fix it. But, other than that this is working fine. |
| Navigation |
| Message Index |
| Previous page |