I’m trying to have a function execute another function, but I’m obviously missing something. LOL
Here below is my faulting attempt, hopefully you guys can show me a smart and correct way of achieving that.
Of course, with that stuff I wrote, I get an error message -1136: Incorrect number of arguments. Expected 1.
I tried to cut down the code to the essential for you…
[COLOR=#993300]private[/COLOR] [COLOR=#993300]function[/COLOR] handledoLogin[COLOR=#000000]([/COLOR]re:[COLOR=#993300]Object[/COLOR][COLOR=#000000])[/COLOR]:[COLOR=#993300]void[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR]re != [COLOR=#993300]null[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
success[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR] [COLOR=#993300]else[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#f000f0]*// some other stuff*[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#993300]private[/COLOR] [COLOR=#993300]function[/COLOR] success[COLOR=#000000]([/COLOR] pResponse:* [COLOR=#000000])[/COLOR]:[COLOR=#993300]void[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] p [COLOR=#993300]in[/COLOR] pResponse.[COLOR=#000000]serverInfo[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR] p, [COLOR=#0000ff]" : "[/COLOR] + pResponse.[COLOR=#000000]serverInfo[/COLOR][COLOR=#000000][[/COLOR]p[COLOR=#000000]][/COLOR] [COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
I tried invoking as success(pResponse); and having defined pResponse as a private variable earlier in the code, but I get Error #1010: A term is undefined and has no properties
I get the same error if I get rid of the argument in the function… :hitman2: