Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
Using 'format' like a hundred times doesn't looks like the most efficient way to script a file reading. I'm really confused at this and will appreciate if someone told me a better way to get around this.
Posts: 977
Threads: 10
Joined: Apr 2011
Reputation:
0
What do you mean using format? The only time you'd have to use that is formatting the player's name and directory of the INI file (assuming that's even how you save the files).
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
Using 'format', for example, getting a player's AdminLevel. First we will have to use 'PlayerInfo[playerid][pInfo]' and save it in a string. Then we can write it in the user file. That 'format'
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
Alright thank you. Also, I would like you to ask you, why have you used the %i, instead of %d. As, GetPlayerScore and PlayerAdminLevel will be in numericals. I don't know what does %i does btw. Thanks for the reply.
Posts: 977
Threads: 10
Joined: Apr 2011
Reputation:
0
Both %i and %d do the same thing, I just prefer to use %i.
Posts: 925
Threads: 36
Joined: Dec 2009
Reputation:
0
It is used for saving a whole number. It does not work as a float. You can try that yourself! Use Pawno and the main() function. Let me give you an example!
new Float:a, Float:b;
main()
{
a = 10;
b = 5;
printf("a/b = %d",floatdiv(a,b));
}
Posts: 198
Threads: 56
Joined: Aug 2009
Reputation:
0
Thank you. +Rep for both of you.