Registration System help?
#1

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
Reply
#2

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

pawn Код:
if(fexist(Path(playerid))
Reply
#4

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

Wrong.
Reply
#5

@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
Reply
#6

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

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
Reply
#8

Mind posting the new errors you got?
Reply
#9

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

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)