03.01.2014, 02:07
So I decided I'd follow a tutorial on how to make a registration system, figuring I could learn a lot from it and then have my own registration system. Well anyway I went about doing this, adding in all of the needed things but I'm getting many errors.
Those are the errors obviously, now here is the portion of code that's having problems.
The part of the registration system starts at the if(fexist) bit. The top part was something else I was working on.
Код:
C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : warning 215: expression has no effect C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : error 001: expected token: ";", but found "-string-" C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : warning 215: expression has no effect C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Nolan\Desktop\Scripting Stuff\Sa-Mp Pawn\Pawn Scripting\pawno\Roleplayscript.pwn(142) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
public OnPlayerConnect(playerid) { new playersconnected=0; new string[254]; new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "Welcome back, %s!", pname); SendClientMessage(playerid, COLOR_GREEN, string); playersconnected++; new string2[128]; format(string2, sizeof(string2), "There are currently %d people in the server!", playersconnected); SendClientMessageToAll(COLOR_GOLD, string2); 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,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit"); } return 1; }