Problem. GUI and 0.3c Colors
#1

Hello all i have problem when i creating inventory system and GUI menu its working fine but when i adding 0.3c colors in GUI meniu me pawno crashing.

Me code:

pawn Код:
COMMAND:inventor( playerid, params[ ] )
{
    #pragma unused params
    new
        String[ 700 ];
    format( String, 700 , ""#BLUE"Jыs turite"#RED" %d "#BLUE"pyragлliu su рokoladu.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"marinuotш viљtш kulљeliш.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"indeliш рaрlyku\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"litrш aliejaus.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"pomidorш.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"marinuotш agurkш.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"indelш keиiupo.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"buteliш Coca-Colos.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"buteliш limonado.",
    playerDB[ playerid ][ Pyrageliai ],
    playerDB[ playerid ][ Kulseles   ],
    playerDB[ playerid ][ Saslikai   ],
    playerDB[ playerid ][ Pyrageliai ],
    playerDB[ playerid ][ Kulseles   ],
    playerDB[ playerid ][ Saslikai   ],
    playerDB[ playerid ][ Aliejus    ],
    playerDB[ playerid ][ Pomidorai  ],
    playerDB[ playerid ][ Agurkai    ],
    playerDB[ playerid ][ Keciupas   ],
    playerDB[ playerid ][ Cola       ],
    playerDB[ playerid ][ Limonadas  ] );
    ShowPlayerDialog( playerid, 147, DIALOG_STYLE_LIST,"
Inventor", String ,"Use","Close" );
    return true;
}
Reply
#2

Try that without "#"

Example:
pawn Код:
SendClientMessage(playerid, -1,""RED"Bla bla bla bla "Blue"bla bla bla");

Edit: show your hex colours codes too.
Reply
#3

Hex:

pawn Код:
#define RED          "{F81414}"
#define BLUE        "{00C0FF}"
without # same
Reply
#4

pawn Код:
#define BLUE        "{F9E8B7}"
Reply
#5

Problem not in Hex code but i tested when me code

pawn Код:
COMMAND:inventor( playerid, params[ ] )
{
    #pragma unused params
    new
        String[ 700 ];
    format( String, 700 , ""#BLUE"Jыs turite"#RED" %d "#BLUE"pyragлliu su рokoladu.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"marinuotш viљtш kulљeliш.\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"indeliш рaрlyku\n\
    "#BLUE"Jыs turite:"#RED" %d "#BLUE"litrш aliejaus.\n\
    "#BLUE"Jыs turite: %d pomidorш.\n\
    Jыs turite: %d marinuotш agurkш.\n\
    Jыs turite: %d indelш keиiupo.\n\
    Jыs turite: %d buteliш Coca-Colos.\n\
    Jыs turite: %d buteliш limonado.",
    playerDB[ playerid ][ Pyrageliai ],
    playerDB[ playerid ][ Kulseles   ],
    playerDB[ playerid ][ Saslikai   ],
    playerDB[ playerid ][ Pyrageliai ],
    playerDB[ playerid ][ Kulseles   ],
    playerDB[ playerid ][ Saslikai   ],
    playerDB[ playerid ][ Aliejus    ],
    playerDB[ playerid ][ Pomidorai  ],
    playerDB[ playerid ][ Agurkai    ],
    playerDB[ playerid ][ Keciupas   ],
    playerDB[ playerid ][ Cola       ],
    playerDB[ playerid ][ Limonadas  ] );
    ShowPlayerDialog( playerid, 147, DIALOG_STYLE_LIST,"
Inventor", String ,"Use","Close" );
    return true;
}
Script compiling fine bu when i adding 1color more its crashing.

So problem
Reply
#6

Mhm try change string.
Reply
#7

Quote:
Originally Posted by Montis123
Посмотреть сообщение
Mhm try change string.
Oh.. problem is not in the String.
Reply
#8

why not make your codes like this?
pawn Код:
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PURPLE 0x9900FFAA
#define COLOR_BROWN 0x993300AA
Reply
#9

Because is not 0.3c colors
Reply
#10

You are using
pawn Код:
#define BLUE        "{F9E8B7}"
And
pawn Код:
"#BLUE"
It's as same as putting 2 of ' " '
You are actually doing
pawn Код:
"#"{F9E8B7}""
So, remove the "'s in the #define.
pawn Код:
#define BLUE        {F9E8B7}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)