#1

Hello! After I added a line in my /stats dialog, "iBox 31",I formatted it and I strcat it and now I get another compiling message.I read that this compiling message is not a good one and it ruins my GM.

Here is the ShowStats function and the line I added last.If i delete it,I get a normal compiling message.

PHP код:
forward ShowStats(playerid,targetid);
public 
ShowStats(playerid,targetid)
{
    if(
IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
    {
        if ( 
GetPVarIntplayerid"Logged" ) == )
            return 
SendClientMessageplayerid, -1""COLOR_RED"To view your stats you must be logged in.");
        if ( 
GetPVarInttargetid"Logged" ) == )
            return 
SendClientMessageplayerid, -1""COLOR_RED"To view his stats,player must be logged in.");
        new
            
iBox2048 ],
            
iBox160 ],
            
iBox260 ],
            
iBox360 ],
            
iBox460 ],
            
iBox590 ],
            
iBox660 ],
            
iBox760 ],
            
iBox860 ],
            
iBox960 ],
            
iBox1060 ],
            
iBox1160 ],
            
iBox1260 ],
            
iBox1360 ],
            
iBox1460 ],
            
iBox1560 ],
            
iBox1660 ],
            
iBox1760 ],
            
iBox1860 ],
            
iBox1960 ],
            
iBox2060 ],
               
iBox2160 ],
               
iBox2260 ],
               
iBox2360 ],
               
iBox2460 ],
               
iBox2560 ],
               
iBox2660 ],
               
iBox2760 ],
               
iBox2860 ],
               
iBox2960 ],
               
iBox3060 ],
               
iBox3160 ],//LINEADDED
            
RegDate40 ],
            
pLastOn20 20 ]
        ;
        
GetPVarStringtargetid"Date"RegDatesizeof RegDate );
        
GetPVarStringtargetid"On"pLastOnsizeof pLastOn );
        
format(iBox1,sizeof(iBox1),""REDSV"%s"BLUESV"'s stats:",pNametargetid ));
        
format(iBox2,sizeof(iBox2),"\n"BLUESV"Age: "REDSV"%d",GetPVarInt(targetid,"Age"));
        
format(iBox3,sizeof(iBox3),"\n"BLUESV"Sex: "REDSV"%s",GetPlayerSex(targetid));
        
format(iBox4,sizeof(iBox4),"\n"BLUESV"Region: "REDSV"%s",GetPlayerRegionName(targetid));
        
format(iBox5,sizeof(iBox5),"\n"ORANGESV"Admin Level{FFFFFF}: "ORANGESV"%s{FFFFFF}["ORANGESV"%d{FFFFFF}]",GetPlayerLevelNametargetid ),GetPVarInttargetid"AdminLevel"));
        
format(iBox6,sizeof(iBox6),"\n"VIPSV"VIP Level: "VIPSV"%d",GetPlayerVLeveltargetid ));
        
format(iBox7,sizeof(iBox7),"\n"BLUESV"Score: "REDSV"%d",GetPlayerScoretargetid ));
        
format(iBox8,sizeof(iBox8),"\n"BLUESV"Money: "REDSV"%d",GetPlayerMoneytargetid ));
        
format(iBox9,sizeof(iBox9),"\n"BLUESV"Coins: "REDSV"%d",GetPVarInttargetid,"Coins" ));
        
format(iBox10,sizeof(iBox10),"\n"BLUESV"Muted: "REDSV"%s",GetPVarInttargetid"Muted" ) ? (""COLOR_RED"YES") : (""COLOR_GREEN"NO"));
        
format(iBox11,sizeof(iBox11),"\n"BLUESV"Warns: "REDSV"%d",GetPVarInttargetid,"Warns"));
        
format(iBox12,sizeof(iBox12),"\n"BLUESV"Wanted: "REDSV"%d"GetPVarInttargetid,"Wanted"));
        
format(iBox13,sizeof(iBox13),"\n"BLUESV"Jailed: "REDSV"%s",GetPVarInttargetid"Jailed" ) ? (""COLOR_RED"YES") : (""COLOR_GREEN"NO"));
        
format(iBox14,sizeof(iBox14),"\n"BLUESV"Jailed Times: "REDSV"%d",GetPVarInt(targetid,"JailedTimes"));
        
format(iBox15,sizeof(iBox15),"\n"BLUESV"Drugs: "REDSV"%d",GetPVarInttargetid,"Drugs" ));
        
format(iBox16,sizeof(iBox16),"\n"BLUESV"Materials: "REDSV"%d",GetPVarInttargetid,"Mats" ));
        
format(iBox17,sizeof(iBox17),"\n"BLUESV"Kills: "REDSV"%d",GetPVarInttargetid,"Kills" ));
        
format(iBox18,sizeof(iBox18),"\n"BLUESV"Best Spree: "REDSV"%s",GetPlayerSpreetargetid ));
          
format(iBox19,sizeof(iBox19),"\n"BLUESV"Deaths: "REDSV"%d",GetPVarInttargetid"Deaths" ));
          
format(iBox20,sizeof(iBox20),"\n"BLUESV"Assasinated: "REDSV"%d",GetPVarInt(targetid,"Assasinated"));
        
format(iBox21,sizeof(iBox21),"\n"BLUESV"Team: %s",GetPlayerTeamNametargetid ));
        
format(iBox22,sizeof(iBox22),"\n"BLUESV"Club: %s",GetPlayerClubNametargetid ));
        
format(iBox23,sizeof(iBox23),"\n"BLUESV"SkinID: "REDSV"%d",GetPVarInttargetid,"Skin"));
        
format(iBox24,sizeof(iBox24),"\n"BLUESV"Fighting Style: "REDSV"%s",GetFightStyleNametargetid ));
        
format(iBox25,sizeof(iBox25),"\n"BLUESV"Walking Style: "REDSV"%s",GetWalkStyletargetid ));
        
format(iBox26,sizeof(iBox26),"\n"BLUESV"Registration Date: "REDSV"%s",RegDate);
        
format(iBox27,sizeof(iBox27),"\n"BLUESV"Last ON: "REDSV"%s",pLastOn);
        
format(iBox31,sizeof(iBox31),"\n"BLUESV"Time ON: "REDSV"%d hours,%d minutes.",GetPVarInt(targetid,"Hours"),GetPVarInt(targetid,"Minutes"));//LINEADDED
        
format(iBox28,sizeof(iBox28),"\n"BLUESV"PM Disabled: "REDSV"%s",GetPVarInttargetid"Disable_PM" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO"));
        
format(iBox29,sizeof(iBox29),"\n"BLUESV"Car God: "REDSV"%s",GetPVarInttargetid"CGod" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO"));
        
format(iBox30,sizeof(iBox30),"\n"BLUESV"Player God: "REDSV"%s",GetPVarInttargetid"God" ) ? (""COLOR_GREEN"YES") : (""COLOR_RED"NO"));
        
strcat(iBox1,iBox1);
        
strcat(iBox,iBox2);
        
strcat(iBox,iBox3);
        
strcat(iBox,iBox4);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox5);
        
strcat(iBox,iBox6);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox7);
        
strcat(iBox,iBox8);
        
strcat(iBox,iBox9);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox10);
        
strcat(iBox,iBox11);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox12);
        
strcat(iBox,iBox13);
        
strcat(iBox,iBox14);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox15);
        
strcat(iBox,iBox16);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox17);
        
strcat(iBox,iBox18);
        
strcat(iBox,iBox19);
        
strcat(iBox,iBox20);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox21);
        
strcat(iBox,iBox22);
        
strcat(iBox,iBox23);
        
strcat(iBox,iBox24);
        
strcat(iBox,iBox25);
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox26);
        
strcat(iBox,iBox27);
        
strcat(iBox,iBox31);//LINEADDED
        
strcat(iBox,"\n"REDSV"---------------------------------------------------------------");
        
strcat(iBox,iBox28);
        
strcat(iBox,iBox29);
        
strcat(iBox,iBox30);
        
ShowPlayerDialogplayeridDIALOG_STATSDIALOG_STYLE_MSGBOXiBox1iBox"OK""");
    }
    return 
1;

Compiling message after adding line:

PHP код:
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
Header size
:          16160 bytes
Code size
:          1811908 bytes
Data size
:          1332616 bytes
Stack
/heap size:      16384 bytesestimated maxusage=4143 cells (16572 bytes)
Total requirements3177068 bytes 
Compiling message before adding line or after I delete it:

PHP код:
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
I READ ****** TOPIC AND I DON'T HAVE ANY 256 STRING,ONLY 128.
These strings are for format string and SendClientMessage,but I have bigger strings for dialogs,like 1024...4-5 string like this one.
Reply
#2

You are probably using a big gamemode if it is already whining about a 60 cells sized array. See if you can maybe reuse one of the other boxes if you arent showing all of them at the same time.
Reply
#3

Solved.I removed - money - line,I already have a money textdraw,so...why do I need money in /stats?)
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
You may not have 256 big arrays, but the total is still vast! Anyway, you could just use ONE array for that code and repeatedly call format.
I will do that!
I use ZCMD.All command that uses format has a "new string[128]". I will add just a "new string[128]" for all command.
Thank you!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)