Sorry if this is the wrong place.
Open notepad and type or copy & paste this into it:
Code:
function helloWorld(){ //function is telling us that this is a new function and helloWorld is the name of the function.
// "//" is a comment.
// { is to open our function.
echo("Hello World!"); // echo prints things into our console anything within the brackets is echoed.
//" " is a tagged field, you don't need these is you're echoing a number, one word or an equation.
} //close the function. Now save it wherever you put your torque folder as a .cs file.
Fire up torque.
Now you'll need to exec it bye typing this into the console (` or ~)
Code:
exec("filepath.cs"); Now type "helloWorld();" into the console, it should print Hello World!
Now for a more complicated one.
Code:
function hello(%arg1, %arg2){ //function again to say this is a new function.
// hello is the name of our function.
// %arg1 and %arg2 are both local variables, they input what we want to say.
echo(%arg1 SPC %arg2); //our echo function again.
// "%arg1 SPC %arg2" If %arg1's string were to equal "Hello" and %arg2 were equal "World" this would Echo "Hello World" SPC add's a space inbetween our 2 strings.
} //close the function Exec it (exec("filepath.cs"); ) then type into console (` or ~) hello("Hello", "World"); it should print Hello World, you can type input anything: hello("Dog", "cat"); hello("Apple", "banana");
If anything's unclear or you're stuck with anything feel free to ask/tell me.