![]() |
dynamic function calling
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:
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. |
Make sure temp.funcname is set to 'prop'. Maybe do an echo to figure out what it is set to. It works for me in DBs. -Tests it in a weapon-
|
Got it to work!
Anyways, I'll leave this here so others can see how to do it. ironically the code I posted worked. |
Just a suggestion: There is no need to use the temp. prefix for function parameters. Parameters are defaulted to the same attributes as temp.variables.
|
Quote:
|
that idea sounds unexpectedly useful for debugging.
|
All times are GMT +2. The time now is 12:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.