Expected token: "-string end-", but found "-identifier-"
#1

Erhm...trying to make dialogs for registering and login..but I have hit a wall..

I keep getting error 001: expected token: "-string end-", but found "-identifier-"
from these lines:
pawn Код:
format(string, sizeof(string), "/sAccounts/%s.ws", player);
    if(fexist(string))
    {
        SendClientMessage(playerid, COLOR_LBLUE, "You are registered, login to retrieve your account");
        ShowPlayerDialog(playerid,56, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Register","Quit");
    }
    else
    {
    SendClientMessage(playerid,COLOR_LBLUE,"Your account isn't registered, please register");
    ShowPlayerDialog(playerid,55, DIALOG_STYLE_INPUT,""COLOR_WHITE"Register",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
    }
I honestly dont see whats wrong with that...give me a little hand please
Reply
#2

youre missing a ; somewhere

I believe this
pawn Код:
if(fexist(string));
I havent tested.
Reply
#3

Ehm..didn't help
Reply
#4

Your ShowPlayerDialog lines are wrong.

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#5

On wich line do you get this error? Can you show above the if( fexist(string)) ?
Reply
#6

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Your ShowPlayerDialog lines are wrong.

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Ah yes, thats what you get for being lazy..did it manually, works now

Thanks for the help anyways.
Reply
#7

Quote:
Originally Posted by Medardo4Life
Посмотреть сообщение
youre missing a ; somewhere

I believe this
pawn Код:
if(fexist(string));
I havent tested.
If-statements definitely don't need a semi-colon! Don't help if you've no idea what to do...

@ Topic author:
If you have something defined as
#define COLOR "{FFFFFF}"
Then you can do
ShowPlayerDialog(playerid, 55, DIALOG_STYLE_INPUT, COLOR_WHITE "Register", COLOR_WHITE "Type your password below to register a new account.", "Register", "Quit");
Reply
#8

ERhmm..another problem
pawn Код:
if(MD5_Hash(inputtext) != AccountInfo[playerid][Password]
                {
                    ShowPlayerDialog(playerid,56,DIALOG_STYLE_INPUT,"Login","Wrong password, try again!","Login","Cancel");
                }
error 033: array must be indexed (variable "MD5_Hash")

D:
Reply
#9

pawn Код:
if(MD5_Hash(inputtext) != AccountInfo[playerid][Password]){
//...........
}
Reply
#10

Ehm.. i have a problem with this lines... This is.
pawn Код:
D:\Royal Gaming\gamemodes\gtarp.pwn(11243) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Royal Gaming\gamemodes\gtarp.pwn(11243) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Royal Gaming\gamemodes\gtarp.pwn(11243) : warning 215: expression has no effect
D:\Royal Gaming\gamemodes\gtarp.pwn(11243) : error 001: expected token: ";", but found "-identifier-"
D:\Royal Gaming\gamemodes\gtarp.pwn(11243) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

pawn Код:
for(new h = 0; h < sizeof(BizzInfo); h++)
    {
        if(BizzInfo[h][bOwned] == 0)
        {
            format(string,sizeof(string), "" color_cyan "Message"wh": %s\n"color_cyan"This Business is for sale\n"color_cyan"Cost"wh": "color_green"%dLei \n"color_cyan"Level"wh": %d \n"color_cyan"to buy this Business \ntype "color_yellow"/buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
            bizsale = Create3DTextLabel(string,COLOR_DBLUE,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], 0.8+BizzInfo[h][bEntranceZ],10.0,0);
        }
Help Please... :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)