Quote:
|
Originally Posted by Skyld
You could just create a function class and join the class to NPCs you wish to use it in.
Also, it might be a bit nicer to use the built-in for () iterator.
PHP Code:
function find(arr, attr, val)
{
for (key: arr)
{
if (key.(@attr) == val)
{
return key;
}
}
return -1;
}
|
oh cooool... I didn't know gscript2 ripped that out of java

. I still think it would be useful as a built in function though. I'd honestly rather have it as a public function, but you can't do clientside public functions.