Author Topic: (Post Small Scripts To Play With Here)  (Read 3159 times)

Code: [Select]
return -2
Why do you have return -2? most people do -1
When called upon by another function, return tells what to give the 'another function' when the function with the statement is called.

For example, my return -2 in Classmonger. You use classmonger like
%class = classmonger("classname");
If it's an invalid input, it returns a -2. If it's an empty input, it returns a -1. If it's a real input, it returns the actual 'class' of the character. It's sorta silly, I had it as a direct way to handle inputting the classes. /class Classname was to call the classmonger to read Classname and find out the real Class. It was a bit goofy. But, meh.

I have a qustion how do i make slash command's i have the basic thing down but it doesent work!
« Last Edit: February 19, 2008, 07:18:22 PM by Lord Iron »

Code: [Select]
function serverCmdCommand(%client,%whatever){
Whatever your function does
}
serverCmdCommand is /Command.

The %client is needed, but after that, its your choice what to use. For example:

Code: [Select]
function serverCmdSay(%client,%message){
messageAll('',%message);
}

That would make the command /say, which you would use by going "/say words" and it would message those words to everyone.

I might have done the messageAll wrong ._.