Error I can't seem to figure out, need help! -
K9IsGodly - 03.01.2014
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.
Код:
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.
Those are the errors obviously, now here is the portion of code that's having problems.
Код:
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;
}
The part of the registration system starts at the if(fexist) bit. The top part was something else I was working on.
Re: Error I can't seem to figure out, need help! -
driftg0d - 03.01.2014
Can you please tell me what is the error line?
Re: Error I can't seem to figure out, need help! -
Hansrutger - 03.01.2014
I might be blind but which line is 142?
Re: Error I can't seem to figure out, need help! -
K9IsGodly - 03.01.2014
Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
That is line 142.
Re: Error I can't seem to figure out, need help! -
Hansrutger - 03.01.2014
Show the defines of DIALOG_LOGIN, all of them. They might have messed up. Other than that, maybe it's the title of the dialog that you are coloring. Otherwise I have no clue.
Re: Error I can't seem to figure out, need help! -
K9IsGodly - 03.01.2014
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
Those are the only defines I added for this particular project.
Re: Error I can't seem to figure out, need help! -
K9IsGodly - 03.01.2014
Would it help for me to show my OnDialogResponse bit of my code? It contains more information involved with this registration system. Just like I have enums and stocks too, but I'm not getting any errors with those so I assume that they're functioning.
Re: Error I can't seem to figure out, need help! -
Hansrutger - 03.01.2014
Give me your color define please.
Re: Error I can't seem to figure out, need help! -
K9IsGodly - 03.01.2014
I fixed it by removing the colors altogether, they just represented an issue.
Re: Error I can't seem to figure out, need help! -
Hansrutger - 03.01.2014
Thought so, anyways if you want colors you should write the defines as this:
#define EMBED_WHITE "{FFFFFF}" I think.