SA-MP Forums Archive
UserPath problem..? - 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: UserPath problem..? (/showthread.php?tid=464767)



UserPath problem..? - CesarLT - 18.09.2013

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.


Re: UserPath problem..? - x96664 - 18.09.2013

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;
}



Re: UserPath problem..? - CesarLT - 18.09.2013

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!