Login System?
#1

OK so i followed another tutorial on a login system, and everything worked except im getting a few errores:
Код:
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(147) : error 017: undefined symbol "USER_FILE"
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(149) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(149) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(149) : warning 215: expression has no effect
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(149) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(149) : fatal error 107: too many error messages on one line

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


6 Errors.
Line 148:
Код:
    if( DOF2_FileExists ( USER_FILE ( playerid ) ) )
Line 149:
Код:
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in","0xFFFFFFFF"Type your "GREEN"password "0xFFFFFFFF"here to log-in",#Log-in,#Quit);
Any ideas?
Reply
#2

Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Welcome.Please log-in", "{FFFFFF}Type your "#GREEN"password {FFFFFF}here to log-in", #Log-in, #Quit);
Reply
#3

I still get the same errors :/
Reply
#4

The dialog should be fine now. So I assume you just need this...
pawn Код:
stock USER_FILE(playerid)
{
    new file[32], name[24];
    GetPlayerName(playerid, name, 24);
   
    format(file,sizeof(file), "/%s.txt", name); // Change //
   
    return file;
}
Change "/%s.txt" to your user account file type and location.
Reply
#5

not sure what you mean by change it to the file type and location im brand new to scripting just started this monday :/
Reply
#6

Where are your user's accounts stored?
Well, find them and right click one of them, click Properties, then next to "Type of file" you should see the file type.
Paste the the location of your users files and the file type here.
Reply
#7

you mean like "file folder" ?
Reply
#8

Yes, the folder where all your user's accounts are.
Reply
#9

i dont have a folder for use accounts? and i still get all the same error messages....
Reply
#10

That's because having the folder created or not has nothing to do with the errors. First, create a folder inside the scriptfiles folder called User_Accounts

Then add this at the very bottom of your script...
pawn Код:
stock USER_FILE(playerid)
{
    new file[32], name[24];
    GetPlayerName(playerid, name, 24);
    format(file,sizeof(file), "/User_Accounts/%s.txt", name);
    return file;
}
If you have any new errors after this, post them here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)