Author Topic: Switch$  (Read 701 times)

I was studying torque and I wanted to practice with switch$. The script I made, although it had no errors, didn't function as I had wanted. Can someone explain what's wrong please? Echo didn't work, I don't have any idea about the rest of the script though.
Code: [Select]
function serverCmdSwitch(%client, %input)
{
   %input = "";
   
   switch$(%input)
   {
      case "Hello":
     echo("Hi"); 
   }
}

You are changing %input before the switch to "". Everytime you have run the command input has been "" because of it.

You are changing %input before the switch to "". Everytime you have run the command input has been "" because of it.
Thank you.