The online racing simulator
LFSLapper Development Forum Custom Code Block
Quote from Tim NL :

SWITCH( GetCurrentPlayerVar("[COLOR=orange]FinishedPos[/COLOR]") ) [COLOR=blue]# you can use any var here[/COLOR]
CASE 1: [COLOR=blue]# 1 is the value of GetCurrentPlayerVar("[COLOR=orange]FinishedPos[/COLOR]")[/COLOR]
[COLOR=seagreen]do something[/COLOR]
BREAK;
CASE 2:
[COLOR=seagreen]do something[/COLOR]
BREAK;
CASE 3:
[COLOR=seagreen]do something[/COLOR]
BREAK;
DEFAULT: [COLOR=blue]# If no value match then do this[/COLOR]
[COLOR=seagreen]do something else[/COLOR]
BREAK;
ENDSWITCH


LFSLapper Development Forum Custom Code Block, it would be nice if this was implemented without having to add the color manually. Victor?
#2 - Bean0
Using PHP instead of CODE gives you colours...


<?php 
 
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 ?
Quote from Dygear :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.
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
Quote from Tim NL :Hi,
It was just a sample , you dont have to use collors in a script.

I know, but I like that fact that you have a specific syntax highlighting for this custom scripting platform.

Quote from Tim NL :But collors can be usefull to read a script more easily.

That's my point.

Quote from Tim NL :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 .

Quote from Tim NL :ps. my name is Tim not Victor

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.

FGED GREDG RDFGDR GSFDG