[Help] Y_INI
#1

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"pName50); 
Reply
#2

what is the code for?
Reply
#3

Quote:
Originally Posted by Y_Less
View Post
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.
Reply
#4

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 
0500++)
    {
        
format(fmt,sizeof(fmt),PATHi);
        
INI_Load(fmt);
        
INI_String("Nome"pName50);
        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.
Reply
#5

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));
Reply
#6

Quote:
Originally Posted by Y_Less
View Post
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
View Post
try use this
GetPlayerName(playerid,playername,sizeof(playernam e));
It would work, but the system I'm doing would require numerical verification.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)