[ '/weaps' ] Command problem.
#1

Hello there guys. I have a little problem with '/weaps' command.
This command since yesterday is making me some problems.
The problem is that, it is crashing my server.
And in server log appears this:

SERVER LOG:
PHP код:
[19:18:58] [debugAMX backtrace:
[
19:18:58] [debug#0 00000065 in ?? (... <28 arguments>) at C:\Users\User\Dropbox\Server\IS\pawno\include\float.inc:102
[19:18:58] [debug#1 00000065 in public cmd_weaps () at C:\Users\User\Dropbox\Server\IS\pawno\include\float.inc:102
[19:18:58] [debug#2 native CallLocalFunction () [080dfac0] from samp03svr
[19:18:58] [debug#3 000087c8 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x0046b264 "/weaps 14") at C:\Users\User\Dropbox\Server\IS\pawno\include\zcmd.inc:108 
COMMAND: '/WEAPS'.
PHP код:
CMD:weapsplayeridparams[ ] )
{
       
CheckLevelplayerid);
    new 
PlayerWeaponAmmoWeaponName20 ];
    if( 
sscanfparams"u"Player ) )
    {
           
SendUsageplayerid"/weaps [Player ID]" );
           return 
1;
    }
    else
    {
        if( 
Player == INVALID_PLAYER_ID )
            return 
SendErrorplayerid"This player is not connected !" );
        new 
Title_String5000 ];
        if( 
Player != playerid formatTitle_StringsizeofTitle_String ), "{%06x}%s(%d) {FFFFFF}weapons:"GetPlayerColorPlayer ) >>> 8PlayerNamePlayer ), Player );
        else 
Title_String "{FFFFFF}My weapons:";
        
eString] = EOS;
           
eString "{FFFFFF}ID\t{FFFFFF}Weapon Name\t{FFFFFF}Ammo\n";
        for( new 
09w++ )
        {
            
GetPlayerWeaponDataPlayerwWeaponAmmo );
            if( 
Ammo Ammo 9999;
            if( 
Weapon != )
            {
                
GetWeaponNameWeaponWeaponName], 20 );
                
formateStringsizeofeString ), "{FFFFFF}%s\t%d\t{FFFF55}%s\t{C0C0C0}%d\n"eStringwWeaponName], Ammo );
            }
        }
        
ShowPlayerDialogplayeridEMPTY_DIALOGDIALOG_STYLE_TABLIST_HEADERSTitle_StringeString"Ok""" );
}
     return 
1;

If you you guys know how to fix it, please reply.
Reply
#2

Is that whole crashlog? I dont see error line.
Reply
#3

Yea it is. The line don't appear idk why, i already have -d3 flag.
Reply
#4

Guys ?
Reply
#5

format these
> else Title_String = "{FFFFFF}My weapons:";

format( ..., sizeof(...), .. ); etc
Reply
#6

Код:
COMMAND:weaps(playerid, params[])
{
	new t_string[128], d_string[128];
	new giveplayerid, ammo, weaponid, weapon[24];
	
	if(sscanf(params, "D(-1)", giveplayerid))
		return SendUsage(playerid, "/weaps <player ID>");

	giveplayerid = (giveplayerid == -1) ? playerid : giveplayerid;

	if(!IsPlayerConnected(giveplayerid))
		return SendError(playerid, "This player is not connected!");

	if(playerid != giveplayerid) format(t_string, sizeof(t_string), "{%06x}%s(%d) {FFFFFF}weapons:", GetPlayerColor(giveplayerid) >>> 8, PlayerName(giveplayerid), giveplayerid);
	else t_string = format(t_string, sizeof(t_string), "{FFFFFF}My weapons:");

    format(d_string, sizeof(d_string), "");
    format(d_string, sizeof(d_string), "%s{FFFFFF}ID\t{FFFFFF}Weapon Name\t{FFFFFF}Ammo\n", d_string);

    for(new j; j < 9; j++)
    {
        GetPlayerWeaponData(giveplayerid, j, weaponid, ammo);

        if (ammo < 0) ammo = 9999;
        if (weaponid != 0)
        {
            GetWeaponName(weaponid, weapon[j], 24);
            format(d_string, sizeof(d_string), "%s{FFFFFF}%s\t%d\t{FFFF55}%s\t{C0C0C0}%d\n", d_string, j, weapon[j], ammo);
        }
    }
    ShowPlayerDialog(playerid, EMPTY_DIALOG, DIALOG_STYLE_TABLIST_HEADERS, t_string, d_string, "Ok", "");
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)