Raised This Month: $ Target: $400
 0% 

Editing a global variable without a function.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
PreDominance
Member
Join Date: Jul 2014
Old 07-31-2014 , 11:56   Editing a global variable without a function.
Reply With Quote #1

Yo,
I have a global variable, an array of strings. I'm trying to edit this array in multiple files, but I want to do so without using a function.

For context, this array is called RACE_NAMES. Each race file, ideally, will have something like: RACE_NAMES[RACE_XXX] = "XXX";

If I do this from inside a function, I have to call that function from somewhere else. The whole point is that, when I add a new race, I only have to edit the RACE_NAMES gVar without having to edit other parts of my plugin to include the race.

Is there a way to do this inside each race's file, or would I just be better off initializing the array when I declare it? The whole point is that I want to minimize the number of things I need to edit when adding a new race.

Last edited by PreDominance; 07-31-2014 at 12:01.
PreDominance is offline
 



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

Forum Jump


All times are GMT -4. The time now is 12:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode