What's Wrong? ShowPlayerDialog
#1

hello Plesae Fast help

PHP код:
CMD:members(playeridparams[])
{
     
ShowPlayerDialog(playeridDIALOG_MEMBERSDIALOG_STYLE_MSGBOX"List of Clan Members !","{00FF00}Leader Of Clan :  {FF0000}Mr.Grape[H]ammer\n\n{00FF00}Four Fangs : {FF0000}Anmol + Prabhjot Singh\n\n{00FF00}Gargoyle Warriors : {FF0000}Hemanth + LiIZoo.\n\n{00FF00}Vicious Snakes : {FF0000}Kiran + Pegasus\n\n{00FF00}Hunder Wolves : {FF0000}superpuma + Nina + ThecnoPrisoner\n\n{00FF00}v0g Bloodhounds : {FF0000}FKSP + teddz + hold + VanStoffen + BenQ + Voyager2 + Capo_Ziyad + HermioneG + CesarWolfman + ZleanRogue + Sunlight + Clara + Tygga + xFive","Close""");

Errors:

Код:
C:\Users\user\Desktop\SERVER\gamemodes\test.pwn(347) : error 075: input line too long (after substitutions)
C:\Users\user\Desktop\SERVER\gamemodes\test.pwn(348) : error 037: invalid string (possibly non-terminated string)
C:\Users\user\Desktop\SERVER\gamemodes\test.pwn(348) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\SERVER\gamemodes\test.pwn(348) : error 029: invalid expression, assumed zero
Reply
#2

Your constant string is too long.
There is a limit on how long a single string can be inside the compiler.
After so long, you must break it down.

PHP код:
CMD:members(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_MEMBERSDIALOG_STYLE_MSGBOX,\
    
"List of Clan Members !","{00FF00}Leader Of Clan :  {FF0000}Mr.Grape[H]ammer\n\n{00FF00}Four Fangs : {FF0000}Anmol +\
    Prabhjot Singh\n\n{00FF00}Gargoyle Warriors : {FF0000}Hemanth + LiIZoo.\n\n{00FF00}Vicious Snakes : {FF0000}Kiran +\
    Pegasus\n\n{00FF00}Hunder Wolves : {FF0000}superpuma + Nina + ThecnoPrisoner\n\n{00FF00}v0g Bloodhounds : {FF0000}FKSP +\
    teddz + hold + VanStoffen + BenQ + Voyager2 + Capo_Ziyad + HermioneG + CesarWolfman + ZleanRogue +\
    Sunlight + Clara + Tygga + xFive"
,"Close""");

Reply
#3

Hello!

@Lynn:
That won't work. This line is too long too. The compiler put your code while the script is compiling into one line.

You have to use format or strcat.
PHP код:
CMD:members(playeridparams[])
{
    new 
string[500];
    
strcat(string,"{00FF00}Leader Of Clan :  {FF0000}Mr.Grape[H]ammer\n\n{00FF00}Four Fangs : {FF0000}Anmol + Prabhjot Singh\n\n");
    
strcat(string,"%s{00FF00}Gargoyle Warriors : {FF0000}Hemanth + LiIZoo.\n\n{00FF00}Vicious Snakes : {FF0000}Kiran + Pegasus\n\n",string);
    
strcat(string,"%s{00FF00}Hunder Wolves : {FF0000}superpuma + Nina + ThecnoPrisoner\n\n",string);
    
strcat(string,"%s{00FF00}v0g Bloodhounds : {FF0000}FKSP + teddz + hold + VanStoffen + BenQ + Voyager2 + Capo_Ziyad + HermioneG + CesarWolfman + ZleanRogue + Sunlight + Clara + Tygga + xFive",string);
    
ShowPlayerDialog(playeridDIALOG_MEMBERSDIALOG_STYLE_MSGBOX"List of Clan Members !",string,"Close""");
    return 
1;

Reply
#4

DELETE redundant characters and it will work work for error 029
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)