Im having a problem with a function.
I want to make a script that calls a function that inside the function returns a random string value.
Example: function
string/void? treasure(){string objeo; int azarss =Random(3)+ 1; if (azarss ==(1)) return objeo("a"); if (azarss ==(2)) return objeo ( "b"); if (azarss ==(3))
return objeo ( "c");
}
//This gave me an error "ERROR: PARSING RETURN STATEMENT"
So when i include the function on a script, i want that every time the function is called it returns a random value inside the function treasure and that value to be saved on a string variable inside the script.
Any better way to do this?
Thanks!





Retour en haut







