[Help] Y_INI - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Y_INI (
/showthread.php?tid=663013)
[Help] Y_INI -
ApolloScripter - 18.01.2019
Why these mistakes?
Code:
SS/Core/Player/TopSystem.pwn(117) : error 017: undefined symbol "name"
SS/Core/Player/TopSystem.pwn(117) : error 017: undefined symbol "value"
On this line:
PHP Code:
INI_String("Nome", pName, 50);
Re: [Help] Y_INI -
GeorgeLimit - 18.01.2019
what is the code for?
Re: [Help] Y_INI -
ApolloScripter - 19.01.2019
Quote:
Originally Posted by Y_Less
Which documentation/tutorial did you use?
|
I read several tutorials here in the forum, to learn how to use it, among them are:
https://sampforum.blast.hk/showthread.php?tid=273088
https://sampforum.blast.hk/showthread.php?tid=570912
I do not know why this happens.
Re: [Help] Y_INI -
ApolloScripter - 19.01.2019
Okay, first let me explain why I'm doing this.
I was two months trying to fix the error that happens with my MySQL, I did not find a solution, then i had to made a way to store data in INI files.
It works as: inside a folder in scriptfiles, the files are stored, in ascending numerical order.
Each file for example contains the player's name and his score, So if I want to get certain data from a certain thing, I just perform a Loop through all files, and I use strcmp to check if the file is or is not from the player.
This would be useful, you could create a system to save vehicles only using .INI, it would include the vehicles of players that are Off too, because the files are numbered, not with the name of each player.
So that's it, the code where the problem is:
PHP Code:
stock UserPath(playerid)
{
new fmt[50];
new pName[50];
new FileID;
for(new i = 0; i < 500; i ++)
{
format(fmt,sizeof(fmt),PATH, i);
INI_Load(fmt);
INI_String("Nome", pName, 50);
if(!strcmp(PlayerName(playerid), pName))
{
FileID = i;
break;
}
}
return FileID;
}
I know this may sound ridiculous, but it is a solution to my problem with MySQL, if anyone can help, I would really appreciate it.
Re: [Help] Y_INI -
GeorgeLimit - 19.01.2019
try use this
Quote:
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return string;
}
|
GetPlayerName(playerid,playername,sizeof(playernam e));
Re: [Help] Y_INI -
ApolloScripter - 19.01.2019
Quote:
Originally Posted by Y_Less
This is why I asked which tutorial you used. That code is nothing like any of the code in any of the tutorials or documentation.
|
I'll try to read more and see what I can do.
Quote:
Originally Posted by GeorgeLimit
try use this
GetPlayerName(playerid,playername,sizeof(playernam e));
|
It would work, but the system I'm doing would require numerical verification.