Thread: save data
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-23-2020 , 18:29   Re: save data
Reply With Quote #6

Quote:
Originally Posted by Sanjay Singh View Post
Do i need to do formatex ? when loading data?
Think about it. Why would you format a string when loading it? Loading a string gets the data from the vault file and puts it into a string. So now you have a string with values that you want to put into variables so they can be used in your plugin.

It's when you save that you need format, because you have variables with data that you need to put into a string so it can be saved into a single vault record...which can later be loaded back into variables.

Data to be saved (each in their own variable): 1 , 2 , 3
Formatted so it can be saved into the vault "1 2 3"

Data loaded from vault "1 2 3"
Parse values back into variables: 1 , 2 , 3

I recommend you study some plugins and code that is posted on the forums to help you better understand.
__________________

Last edited by Bugsy; 01-23-2020 at 18:30.
Bugsy is offline