UserPath problem..?
#1

Hello everyone, I was trying to create a register system recently and I am kinda stuck, I did everything follow this tutorial, and I am getting this errors:

pawn Код:
C:\Users\xxx\Desktop\Hazard Gaming\gamemodes\xxx.pwn(292) : error 017: undefined symbol "UserPath"
C:\Users\xxx\Desktop\Hazard Gaming\gamemodes\xxx.pwn(294) : error 017: undefined symbol "UserPath"
C:\Users\xxx\Desktop\Hazard Gaming\gamemodes\xxx,pwn(307) : error 017: undefined symbol "UserPath"
C:\Users\xxx\Desktop\Hazard Gaming\gamemodes\xxx.pwn(673) : error 017: undefined symbol "UserPath"
C:\Users\xxx\Desktop\Hazard Gaming\gamemodes\xxx.pwn(695) : error 017: undefined symbol "UserPath"
And here are the error lines: (In order like in the error code)

pawn Код:
if(fexist(UserPath(playerid))
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
new INI:File = INI_Open(UserPath(playerid));
new INI:File = INI_Open(UserPath(playerid));
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);


And this is the tutorial.

How do I fix that? Thanks in advance.

P.S. - I am new to scripting so go easy on me lol.
Reply
#2

I hope you have defined:
pawn Код:
#define Path "/Users/%s.ini"

stock UserPath(playerid)
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str),Path,name);
    return str;
}
Reply
#3

Quote:
Originally Posted by x96664
Посмотреть сообщение
I hope you have defined:
pawn Код:
#define Path "/Users/%s.ini"

stock UserPath(playerid)
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str),Path,name);
    return str;
}
I had it but apparently I had misstyped or something, anyways got that to compile, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)