You'll probably want to use a string switch:
function serverCmdSetOrbColor(%client, %color) {
switch$(strlwr(%color)) {
case "red":
// Change color
case "green":
// Change color
case "blue":
// Change color
default:
messageClient(%client, '', "\c6The color\c3" SPC %color SPC "\c6could not be found.");
return;
}
messageClient(%client, '', "\c6Your orb is now\c3" SPC strlwr(%color) @ "\c6.");
}
If you want to use if else, its syntax is like this:
if (%str $= "a") {
echo("A");
}
else if (%str $= "b") {
echo("B");
}
else {
echo("Neither A nor B");
}