PDA

View Full Version : Function Data


TheStan
08-09-2008, 04:31 AM
Found out today from Inverness that functions are variables (that I knew) which do have sub-variables (that I didn't). So I made up a quick function to get the variable data from built in functions. I'm not really sure if any of this data is writable for built-in or script made functions, but I'll probably be finding out later.


public function getfuncdata(func, obj, data) {
temp.functions = null;
temp.f = null;

if (obj == null) {
obj = this;
}
functions = obj.getfunctions();
for (f: functions) {
if (f == func) {
switch (data) {
case "desc": case "description": return (f.description); break;
case "params": case "parameters": return (f.parameters); break;
case "scope": return (f.scope); break;
}
}
}
}


Function is pretty self-explanatory but if explanations are needed I'd be happy to give them. :)

cbk1994
08-09-2008, 04:37 AM
Cool, I didn't know that :O

Inverness
08-09-2008, 05:31 AM
Bakayarou!, getfunctions() does not return the function objects. It just returns variables with subvariables.

I don't like how you made it sound like I told you something incorrect. :\

TheStan
08-09-2008, 05:34 AM
Bakayarou!, getfunctions() does not return the function objects. It just returns variables with subvariables.

I don't like how you made it sound like I told you something incorrect. :\

Fixed happy? :D

WhiteDragon
08-09-2008, 05:58 AM
I like how Inverness didn't mention I told him this. :(

Doesn't matter, it's in /scripthelp. Documented incorrect anyways.

Inverness
08-09-2008, 06:11 AM
I like how Inverness didn't mention I told him this. :(I wasn't the one who started a thread on it, or I would have mentioned you.

WhiteDragon
08-09-2008, 07:17 AM
I wasn't the one who started a thread on it, or I would have mentioned you.

I would have mentioned how beautiful you are.