View Full Version : LFSLapper Development Forum Custom Code Block
Dygear
3rd September 2009, 13:32
SWITCH( GetCurrentPlayerVar("FinishedPos") ) # you can use any var here
CASE 1: # 1 is the value of GetCurrentPlayerVar("FinishedPos")
do something
BREAK;
CASE 2:
do something
BREAK;
CASE 3:
do something
BREAK;
DEFAULT: # If no value match then do this
do something else
BREAK;
ENDSWITCH
LFSLapper Development Forum Custom Code Block, it would be nice if this was implemented without having to add the color manually. Victor?
Bean0
3rd September 2009, 13:38
Using PHP instead of CODE gives you colours...
SWITCH( GetCurrentPlayerVar("FinishedPos") ) # you can use any var here
CASE 1: # 1 is the value of GetCurrentPlayerVar("FinishedPos")
do something
BREAK;
CASE 2:
do something
BREAK;
CASE 3:
do something
BREAK;
DEFAULT: # If no value match then do this
do something else
BREAK;
ENDSWITCH
Any good ?
Tim NL
3rd September 2009, 13:47
LFSLapper Development Forum Custom Code Block, it would be nice if this was implemented without having to add the color manually. Victor?
Hi,
It was just a sample , you dont have to use collors in a script.:D
But collors can be usefull to read a script more easily.
If you open a script with something like PSPad you can have automatic collors in your scripts. http://www.lfsforum.net/showthread.php?t=59967
ps. my name is Tim not Victor :D
Dygear
3rd September 2009, 15:07
Hi,
It was just a sample , you dont have to use collors in a script.:D
I know, but I like that fact that you have a specific syntax highlighting for this custom scripting platform.
But collors can be usefull to read a script more easily.
That's my point.
If you open a script with something like PSPad you can have automatic collors in your scripts. http://www.lfsforum.net/showthread.php?t=59967
I like NotePad2 better :).
ps. my name is Tim not Victor :D
I know, I was asking the Dev Victor if he would mind commenting, as I'm pretty sure he is in charge of anything to do with the websites, thus this is his turf.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.