SA-MP Forums Archive
Registration dialog problem.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Registration dialog problem.. (/showthread.php?tid=466895)



Registration dialog problem.. - Scrillex - 29.09.2013

I can't find a thing.. whats wrong with it..

Error:
pawn Код:
error 001: expected token: "-string end-", but found "-identifier-"
(133) : warning 215: expression has no effect
(133) : error 001: expected token: ";", but found "-string-"
(133) : warning 215: expression has no effect
(133) : error 001: expected token: ";", but found ")"
(133) : fatal error 107: too many error messages on one line
here is the code

pawn Код:
new naslov2[128], text[128], strText[104];
    format(strText, 35, USER_FILE, GetName(playerid));
    if(!INI_Exists(strText))
    {
        format(naslov2, sizeof(naslov2), " "COLOR_GREEN" Welcome "COL_WHITE" %s!", GetName(playerid));//This line!
        format(text, sizeof(text), ""COL_WHITE"______________________________\n\n"COLOR_GREEN"Name"COL_WHITE" %s"COLOR_GREEN" isn't registered!\n\nPlease register!", GetName(playerid));
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, naslov2, text, "Register", "Exit");
    }
    else
    {
        format(naslov2, sizeof(naslov2), ""COLOR_GREEN"     Welcome"COL_WHITE" %s!", GetName(playerid));
        format(text, sizeof(text),""COL_WHITE"______________________________\n\n"COLOR_GREEN"Name"COL_WHITE" %s"COLOR_GREEN" is registered!\n\nPlease login!", GetName(playerid));
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, naslov2, text, "Login", "Exit");
    }



Re: Registration dialog problem.. - xganyx - 30.09.2013

are you sure the "COLOR_GREEN" or "COL_GREEN"


Re: Registration dialog problem.. - EiresJason - 30.09.2013

Make sure the colours you want to insert into the format are defined like this:
pawn Код:
#define COL_WHITE           "{FFFFFF}"
#define COLOR_GREEN             "{00FF22}"
And not like this:
pawn Код:
#define COL_WHITE       0xFFFFFFAA
#define COLOR_GREEN         0x33AA33AA



Re: Registration dialog problem.. - Scrillex - 30.09.2013

Still the same thing...

Colors..
#define COL_WHITE 0xFFFFFFAA
#define COLOR_GREEN2 0x33AA33AA


Re: Registration dialog problem.. - EiresJason - 30.09.2013

Oh, I think I just noticed a mistake on my part.

Maybe try this?

pawn Код:
#define COL_WHITE           {FFFFFF}
#define COLOR_GREEN             {00FF22}
Maybe it will work actually lol

I removed it thinking it was incorrect but it might work.

EDIT: Nope, won't work I think.


Re: Registration dialog problem.. - Scrillex - 30.09.2013

Okay I will wait Thanks for help mate


Re: Registration dialog problem.. - EiresJason - 30.09.2013

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Still the same thing...

Colors..
#define COL_WHITE 0xFFFFFFAA
#define COLOR_GREEN2 0x33AA33AA
Wait, did you not change the above defines to my defines?

pawn Код:
#define COL_WHITE           "{FFFFFF}"
#define COLOR_GREEN2                "{33AA33}"



Re: Registration dialog problem.. - DarrenReeder - 30.09.2013

Need to just add " " marks onto the fixed colour defines.

"{FFFFFF}" like that


Re: Registration dialog problem.. - Scrillex - 30.09.2013

Oh Okay


Re: Registration dialog problem.. - EiresJason - 30.09.2013

Is it working Scrillex?