Quote:
Originally Posted by cbk1994
Not sure what you're asking.
|
For instance, I guess function onPlayerGrabs(){ }
could be made a class that could return true and make the if statement work..
if (onPlayerGrabs()){} "I think could work assuming it is joined to the class"
could return true or false.. I don't know how it works really...
Quote:
Originally Posted by cbk1994
You can only return one value. Use arrays for returning multiple.
|
Oh I see.. thanks ^.^;
In the future could they do it with commas to add more, or is there no point?
Quote:
Originally Posted by cbk1994
Functions return values, not variables. You can assign them to whatever variable you want to.
|
I've had a function go through all players, and didn't accept externals.
I had it as:
variable
temp.count = 0;
a lot of script...
return temp.count
and
return count
which kept becoming 0 or null... in the end I set it to this.count = temp.count and it finally worked with:
return this.count
I couldn't get it to pass the temp. variable D: