What does it mean
#1

INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

Can someone explain what does it mean and what is it used for?
Reply
#2

Sure.
1. INI_ParseFile is an y_ini library function for parsing ini files
2. UserPath is probably a macro/function somewhere on top of your script which provides path to user files from playerid.
3. "LoadUser_%s" is a format pattern. Assume that ini file looks like
pawn Код:
[some_random_stuff]
A = B
C = 5
Then it will call "LoadUser_som_random_stuff" public function twice, once for "A" with value of "B", then "C" with a value of "5".
4. .bExtra means that you want to pass additional parameter to your LoadUser_%s function, and
5. .extra contains the value you want to pass, playerid in this case
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Sure.
1. INI_ParseFile is an y_ini library function for parsing ini files
2. UserPath is probably a macro/function somewhere on top of your script which provides path to user files from playerid.
3. "LoadUser_%s" is a format pattern. Assume that ini file looks like
pawn Код:
[some_random_stuff]
A = B
C = 5
Then it will call "LoadUser_som_random_stuff" public function twice, once for "A" with value of "B", then "C" with a value of "5".
4. .bExtra means that you want to pass additional parameter to your LoadUser_%s function, and
5. .extra contains the value you want to pass, playerid in this case
Thanks
Reply
#4

I want to do a system with vehicles(car ownership...),can you tell me step by step what should i do first because i've never been doing script with files so i need little help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)