SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04/06/2012, 06:06 PM   #1
Huge Clucker
Join Date: Aug 2007
Posts: 206
Reputation: 13
Default Dynamic Variable Naming / Variable Variables / Indirect Variable Access

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] = {

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.
Redgie is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error(warning 219: local variable "string" shadows a variable at a preceding level) calin1996 Scripting Help 6 25/04/2012 03:13 PM
warning 219: local variable "PlayerName" shadows a variable at a preceding level captainjohn Scripting Help 2 13/04/2012 07:44 PM
How do I access a variable in another running script? biltong Help Archive 1 07/04/2010 10:36 PM
TextDraws as server variable?? How to i change to Player Variable? DarrenReeder Help Archive 2 06/04/2010 07:02 AM

All times are GMT. The time now is 06:11 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.