Okay, I'm trying to do something, and I'm not sure if its supported by GS2 or not.
I'm trying to redo my system in such a way that I can call any function from chat or suchlike without having one gigantic switch and hardcoding each functioncall.
Basically, I'm trying to do this:
PHP Code:
function callfunc(temp.funcname,temp.fparams) {
temp.fparams=replacemarkers(temp.fparams); // replace escapes with values
(@temp.funcname)(temp.fparams); // call the function
}
function prop(temp.fparams) {
do_stuff();
}
This way I could call a showimg, setfocus, local functions, etc.
I'm going to add in a preset sys that lets me do preset action (or set new ones) to keys. as an example, lmouse="gani $ sit 0" would call a local gani() function with the params "$m jellybean blue.png". (I use $m as an escape that refers to the current mousetarget. others are $mx $my for mouse xy, etc)
Problem I'm having - this just doesn't work.