Little Help
#1

Hello I don`t see problem here please anyone see it?

pawn Код:
if(dialogid == 541)
    {
        if(!response) return 1;
        switch(listitem)
        {
            case 0:
            {
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFFFFFF,""ember_red"[ERROR] "embed_white"You don`t have enough money to buy this bomb!");
                C4[playerid] ++;
                SendClientMessage(playerid,0xFFFFFFF,"{FFD400}[C4] "embed_white"You have bought C4.Now to plant it use command /plant");
            }
        }
    }
ERROR:
Код:
D:\SA-MP Server Stuff\SA-MP Server\gamemodes\Reg.pwn(2883) : error 001: expected token: "-string end-", but found "-identifier-"
D:\SA-MP Server Stuff\SA-MP Server\gamemodes\Reg.pwn(2883) : error 017: undefined symbol "ember_red"
D:\SA-MP Server Stuff\SA-MP Server\gamemodes\Reg.pwn(2883) : warning 215: expression has no effect
D:\SA-MP Server Stuff\SA-MP Server\gamemodes\Reg.pwn(2883) : error 001: expected token: ";", but found ")"
D:\SA-MP Server Stuff\SA-MP Server\gamemodes\Reg.pwn(2883) : fatal error 107: too many error messages on one line

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


4 Errors.
LINE : 2883 is
pawn Код:
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFFFFFF,""ember_red"[ERROR] "embed_white"You don`t have enough money to buy this bomb!");
Reply
#2

Is the defination correct, for example
pawn Код:
#define ember_red "{FF0000}"
Reply
#3

tried this and will work
pawn Код:
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFFFFFF,"{FF002B}[ERROR]: {000000}You don`t have enough money to buy this bomb!");
dont worry these are the color which u want!
Reply
#4

Seems like it is your use of colour embedding, AFAIK you cannot have two consecutive quotation marks as the start of the string, as it will be its end, therefore the warnings/errors.
The thing is, if you use it like this:
Код:
return SendClientMessage(playerid, 0xFFFFFF,""embed_red"[ERROR] "embed_white"You don`t have enough money to buy this bomb!");
Then it will give errors because you have two qutation marks at the beginning.
On the other hand, if you escaped it using the backslash character:
Код:
return SendClientMessage(playerid,0xFFFFFF,"\"embed_red\"[ERROR] \"embed_white\"You don`t have enough money to buy this bomb!");
It won't give you any errors. So have fun using your colour embedded strings inside a string, just remember to escape them!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)