Expected token - Register Dialog
#1

pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
My code, And errors:

Код:
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : warning 215: expression has no effect
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : error 001: expected token: ";", but found "-string-"
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : warning 215: expression has no effect
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(91) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FFFFFF}Login","{FFFFFF}Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Reply
#3

what is COL_WHITE defined as? is it a color definition? only strings can be stuffed in like that like if
pawn Код:
#define COL_WHITE "poooooop"
Reply
#4

Quote:
Originally Posted by NumbSkull
Посмотреть сообщение
what is COL_WHITE defined as? is it a color definition? only strings can be stuffed in like that like if
pawn Код:
#define COL_WHITE "poooooop"
#define COL_WHITE 0xFFFFFFFF

And the other code still game me the same errors :S
Reply
#5

COL_WHITE can only be used in asigning a color to a thing like
pawn Код:
SendClientMessage(playerid, COL_WHITE, "Welcome to my server!");
not stuffed into a place that is looking for a string in there use the websafe hex colors like GiamPy said
Reply
#6

Quote:
Originally Posted by NumbSkull
Посмотреть сообщение
COL_WHITE can only be used in asigning a color to a thing like
pawn Код:
SendClientMessage(playerid, COL_WHITE, "Welcome to my server!");
not stuffed into a place that is looking for a string in there use the websafe hex colors like GiamPy said
Thanks, Does this mean i have to change my color defines?
Reply
#7

no it just means you cant use them inside a string like that
Reply
#8

Those HEX values can only be used in functions as SendClientMessage (the second parameter). A full string has to be entered in functions as ShowPlayerDialog. The format is different.

Second parameter in (eg) SendClientMessage is a real HEX value. ShowPlayerDialog stuff is a string formatted between brackets.
Reply
#9

I think you didn't call the dialog ID NUMBER to call..hehehe am i right?
Reply
#10

What is in your line 91??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)