Callback functions

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
Is it possible for a UI callback function to have 3 parameters? I noticed SetVoid3 does not exist. The whole process of passing parameters to a callback function is done very strangely... :dubious:

Edit: nevermind, I found the SetVoids function. I wonder why they have SetVoid1 and SetVoid2 instead of just using SetVoids? It doesn't make any sense.

Edit again: Okay... so SetVoids can only pass 2 parameters as well. It can't accept tables either. I tried passing a table as 1 parameter, printed the table inside the function, and it said it's the number 0 instead of a table. This UI code was designed really poorly. I can't even use global variables instead of passing function parameters, because the functions are not called right away. I think I'll have to serialize the values as a string, pass that, then de-serialize them in the function. :think:
 
I think I'll have to serialize the values as a string, pass that, then serialize them in the function. :think:

Even that may not work as there are no examples of using anything other than int's in the core game code, and the one time I tried to use a string IIRC it failed.
 
Back
Top Bottom