SA-MP Forums Archive
Registration System help? - 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: Registration System help? (/showthread.php?tid=451901)



Registration System help? - Elie1996 - 19.07.2013

I'm recently making a registration system using YSI method, this is my first time making a registration system. Anyhow here are my errors:

pawn Код:
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(123) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(125) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(139) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : error 017: undefined symbol "pInfo"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(141) : warning 215: expression has no effect
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : error 001: expected token: ";", but found "]"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(141) : error 029: invalid expression, assumed zero
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
Line 114:
pawn Код:
if(fexist(Path(playerid)))
Path Definition and stock:
pawn Код:
#define UserPath "Users/%s.ini"
// under the enum you have:
stock Path(playerid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str), UserPath,name); //edit
    return str;
}
I've been trying forever, if someone can help me, it'll be appreciated


Re: Registration System help? - gtakillerIV - 19.07.2013

Your stock and define can't have the same name. They're possibly conflicting.


Re: Registration System help? - PrinceKumar - 19.07.2013

pawn Код:
if(fexist(Path(playerid))



Re: Registration System help? - gtakillerIV - 19.07.2013

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
pawn Код:
if(fexist(Path(playerid))
if(fexist(Path(playerid))

Wrong.


Re: Registration System help? - Elie1996 - 19.07.2013

@gtakillerIV
I changed the definition and stock path, check it out (edited & updated it). And I got the new errors...
I'm not sure how to define Path, or if it even should be defined


Re: Registration System help? - PrinceKumar - 19.07.2013

okay sorry , can i get to know where you are putting if(fexist(Path(playerid)))


Re: Registration System help? - Elie1996 - 19.07.2013

Yeh, Sure. here you go:
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    if(fexist(Path(playerid)))
    {// then
        INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
        return 1;
    }
return 1;
That's all I have at the moment since I only have the registration system on this script


Re: Registration System help? - gtakillerIV - 19.07.2013

Mind posting the new errors you got?


Re: Registration System help? - Elie1996 - 19.07.2013

They are in the upper post (first one) I updated them


Re: Registration System help? - Elie1996 - 20.07.2013

bump, I really need help on this....
Here are the errors again:
pawn Код:
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(123) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(125) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(139) : error 017: undefined symbol "Path"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : error 017: undefined symbol "pInfo"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(141) : warning 215: expression has no effect
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : error 001: expected token: ";", but found "]"
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie's Roleplay.pwn(141) : error 029: invalid expression, assumed zero
C:\Users\Eli\Downloads\samp03x_svr_R1-2_win32\gamemodes\Elie'
s Roleplay.pwn(141) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.

***NOTE: the thing that bothers me is that Path is a stock...