Saving Data
Posted: Fri Mar 10, 2017 12:24 am
So right now I'm making a mod called "Factions". Right now I'm unable to save who is the owner of a force. Is there a way to do this, or no? If so, please let me know how!
Sorry, I guess I miss worded it, I'm not the best with introductory posts. I meant how would I be able to save any type of data, like for example a player role in the type of a string such as "owner", "creator", "admin", "moderator", etc... Or maybe an array of players names, or a boolean?Rseding91 wrote:There is no "owner" of a force: just players on a given force. Actually the force doesn't even need to have a player in it. Forces can exist without any players (such as the enemy force and neutral force).
Code: Select all
global.roles[force][player_index] = "owner"
Everything that's not local is automaticly put in the global table, correct? Nevermind, I just re-read this. Thank you all for the help, I really appreciate it!DaveMcW wrote:Everything you care about saving when an event ends should be in the global table.Code: Select all
global.roles[force][player_index] = "owner"