SA-MP Forums Archive
Login / Register errors. - 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: Login / Register errors. (/showthread.php?tid=363073)



Login / Register errors. - Cxnnor - 26.07.2012

I am experiencing some errors with my UserPath and other functions, I wish for some help, so I posted here.

pawn Код:
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_WHITE"Registering...",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Код:
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(49) : error 017: undefined symbol "PATH"
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : warning 215: expression has no effect
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : error 001: expected token: ";", but found "-string-"
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : warning 215: expression has no effect
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Connor\Desktop\Development\0.3E - SCRIPT\gamemodes\AGS.pwn(248) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.



Re: Login / Register errors. - Stigg - 26.07.2012

Do you have something like:
pawn Код:
#define PATH "/yourserver/yourusers/%s.ini"
at the top of your script


Re: Login / Register errors. - Cxnnor - 26.07.2012

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Do you have something like:
pawn Код:
#define PATH "/yourserver/yourusers/%s.ini"
at the top of your script
Correct, I have.
pawn Код:
#define PATH "//bla bla bla, my path goes here"



Re: Login / Register errors. - nton - 26.07.2012

add top of your script
#define PATH "/Users/%s.ini"


Re: Login / Register errors. - Cxnnor - 26.07.2012

Quote:
Originally Posted by nton
Посмотреть сообщение
add top of your script
#define PATH "/Users/%s.ini"
Read above, I already have that.


Re: Login / Register errors. - nton - 26.07.2012

post whole code


[SOLVED] - Cxnnor - 26.07.2012

Solved it myself