SDK - Var Name?

Posted By: LoneWolf

SDK - Var Name? - 01/30/07 00:56

Hello,

I have been searching around the SDK and I see that there is a way to access the c-script name of an object using the C_LINK structure in strings, Sounds, etc... which is very useful for my current project.
Is there also a way to access the C-Script name of a var if i have a pointer to that var (or a way of going through all the vars as a list), from what i can see they appear to be stored very differently?

Also will the SDK continue to work when lite-c is released, or is there to be any big changes?

Thanks
Posted By: jcl

Re: SDK - Var Name? - 02/02/07 15:50

The SDK will work the same way with lite-C.

However there is no direct way to get a var name for its pointer, or to enumerate all variables. This could be implemented, theoretically, but what for would you need it?
Posted By: LoneWolf

Re: SDK - Var Name? - 02/02/07 16:24

Thanks for the reply,

I am looking into doing some network code, it would be very helpfull to be able to register all variables so that i can assign an id to each that is recognised between the server and any clients. I was going to enumerate the strings but the only other method for variables is to register the variable by its name first which is not a very clean way of doing it because every variable that is sent over the network will need to be registered first.

I have another question that i have just come across, I noticed that send_var sends an entire array, does this mean it is possible to determine the number of elements in an array>. This would be helpfull to prevent overflows in my plugins

Thanks
© 2024 lite-C Forums