SA-MP Forums Archive
Problem. GUI and 0.3c Colors - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem. GUI and 0.3c Colors (/showthread.php?tid=236936)



Problem. GUI and 0.3c Colors - Raimis_R - 08.03.2011

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;
}



Re: Problem. GUI and 0.3c Colors - HyperZ - 08.03.2011

Try that without "#"

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

Edit: show your hex colours codes too.


Re: Problem. GUI and 0.3c Colors - Raimis_R - 08.03.2011

Hex:

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


Re: Problem. GUI and 0.3c Colors - HyperZ - 08.03.2011

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



Re: Problem. GUI and 0.3c Colors - Raimis_R - 08.03.2011

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


Re: Problem. GUI and 0.3c Colors - Montis123 - 08.03.2011

Mhm try change string.


Re: Problem. GUI and 0.3c Colors - Raimis_R - 08.03.2011

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


Re: Problem. GUI and 0.3c Colors - yoan103 - 08.03.2011

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



Re: Problem. GUI and 0.3c Colors - Raimis_R - 08.03.2011

Because is not 0.3c colors


Re: Problem. GUI and 0.3c Colors - Mean - 08.03.2011

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}