Dynamic Variable Naming / Variable Variables / Indirect Variable Access
#1

I've been told this is impossible in C so I have very little hope it's possible in P, but what I'm trying to do is use this for a textdraw system, whereby the name the variable containing the textdraw is referenced dynamically, such as:

Storing the Textdraw Variable names
pawn Code:
new Array[1][1] = {
{"ArrayName"}
};
Referencing the Variable Name
pawn Code:
new Text:Array[0][0] = TextDrawCreate(blaa blaa);
Obviously this doesn't work, but any idea on a system that would achieve similar results? What I'm trying to achieve is a none-static system, otherwise applying the textdraw effects has to be done on individual textdraw names which is not an option...

If this isn't a clear enough explanation, it is somewhat achieved with PHP's $$Variable system.
Reply


Messages In This Thread
Dynamic Variable Naming / Variable Variables / Indirect Variable Access - by Redgie - 04.06.2012, 18:06
Re: Dynamic Variable Naming / Variable Variables / Indirect Variable Access - by ViniBorn - 04.06.2012, 18:22
Re: Dynamic Variable Naming / Variable Variables / Indirect Variable Access - by MP2 - 04.06.2012, 19:01
Re: Dynamic Variable Naming / Variable Variables / Indirect Variable Access - by Redgie - 04.06.2012, 19:32

Forum Jump:


Users browsing this thread: 1 Guest(s)