Saving Data
Saving Data
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!
Re: Saving Data
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).
If you want to get ahold of me I'm almost always on Discord.
Re: Saving Data
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).
Re: Saving Data
Code: Select all
global.roles[force][player_index] = "owner"
Re: Saving Data
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"