SA-MP Forums Archive
What's Wrong with this Command ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: What's Wrong with this Command ? (/showthread.php?tid=545719)



What's Wrong with this Command ? - MCZOFT - 09.11.2014

hello ,
i have problem with my server i dont know what's wrong with it really , when i used it i used it without errors and i see nothings wrong with it ( Lines are fine ) but , something is wrong ..

when im doing example : /store (in my house it works fine he gives me the Usage etc .. )
BUt
When im doing for example , /store (weapon1) (amount of ammo) weapon1 it doesnt store ,.... ( im using mysql tabels to save the House weapons and drugs etc .. )

it stucks when im doing the ammo , like nothing happens
.. i hope you understand what i mean

PHP код:

YCMD
:store(playeridparams[], help)
{
    if(
help) return SCM(playeridCOLOR_GREY"Not supported");
    if(
IsPlayerConnected(playerid))
    {
        new 
lname[24], amount;
        if(
sscanf(params"s[60]d"lnameamount))
        {
            
SCM(playeridCOLOR_WHITE"USAGE: /store [name] [amount/ammo]");
            
SCM(playeridCOLOR_WHITE"Available names: drugs, materials, weapon, weapon2, weapon3, weapon4, weapon5, weapon6");
            return 
1;
        }
        if(
strcmp(params,"drugs",true) == 0)
        {
            new 
string[256], dammounthouse PlayerInfo[playerid][pPhousekey];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"dammount))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store drugs [amount]");
                    
format(stringsizeof(string),"* You are Carrying %d Drugs",PlayerInfo[playerid][pDrugs]);
                    
SCM(playeridCOLOR_GRAD1string);
                    return 
1;
                }
                if(
dammount PlayerInfo[playerid][pDrugs]) return SCM(playeridCOLOR_GREY"   You don't have so many drugs.");
                if(
HouseInfo[house][hDrugs] >= 10000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 10000 Limit.");
                
PlayerInfo[playerid][pDrugs] -= dammount;
                
HouseInfo[house][hDrugs] += dammount;
                if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his sack with drugs and places it on the safe."GetPlayerNameEx(playerid)); }
                else { 
format(stringsizeof(string), "* %s takes out her sack with drugs and places it on the safe."GetPlayerNameEx(playerid)); }
                
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                
OnPropUpdate(1house);
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"materials",true) == 0)
        {
            new 
string[256], dammounthouse PlayerInfo[playerid][pPhousekey];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"dammount))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store materials [amount]");
                    
format(stringsizeof(string),"* You are Carrying %d Materials",PlayerInfo[playerid][pMats]);
                    
SCM(playeridCOLOR_GRAD1string);
                    return 
1;
                }
                if(
dammount PlayerInfo[playerid][pMats]) return SCM(playeridCOLOR_GREY"* You don't have so many Materials.");
                if(
HouseInfo[house][hMaterials] >= 35000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 35000 Limit.");
                
PlayerInfo[playerid][pMats] -= dammount;
                
HouseInfo[house][hMaterials] += dammount;
                if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his sack with materials and places it on the safe."GetPlayerNameEx(playerid)); }
                else { 
format(stringsizeof(string), "* %s takes out her sack with materials and places it on the safe."GetPlayerNameEx(playerid)); }
                
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                
OnPropUpdate(1house);
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][1] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][2] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][2] = weapon;
                        
HouseInfo[house][hAmmo][2] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][2] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][2] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][2] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                    
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon2",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon2 [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][1] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][1] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][1] = weapon;
                        
HouseInfo[house][hAmmo][1] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][1] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][1] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][1] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* You don't have any weapon in your hand!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon3",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon3 [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][2] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][2] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][2] = weapon;
                        
HouseInfo[house][hAmmo][2] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][2] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][2] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][2] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* You don't have any weapon in your hand!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon4",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon4 [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][3] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][3] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][3] = weapon;
                        
HouseInfo[house][hAmmo][3] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][3] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][3] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][3] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* You don't have any weapon in your hand!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon5",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon5 [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][4] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][4] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][4] = weapon;
                        
HouseInfo[house][hAmmo][4] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][4] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][4] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][4] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* You don't have any weapon in your hand!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
        else if(
strcmp(params,"weapon6",true) == 0)
        {
            new 
string[256], ammohouse PlayerInfo[playerid][pPhousekey];
            new 
gunname[24];
            if(
IsPlayerInRangeOfPoint(playerid15HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
            {
                if(
sscanf(params"d"ammo))
                {
                    
SCM(playeridCOLOR_GRAD1"USAGE: /store weapon6 [ammo]");
                    return 
1;
                }
                if(
ammo GetPlayerAmmo(playerid))
                {
                    
SCM(playeridCOLOR_GREY"   You don't have so many Ammo.");
                    return 
1;
                }
                new 
weapon GetPlayerWeapon(playerid);
                
GetWeaponName(weapon,gunnamesizeof(gunname));
                if(
weapon != 0)
                {
                    if(
HouseInfo[house][hWeapon][5] == 0)
                    {
                        if(
HouseInfo[house][hAmmo][5] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hWeapon][5] = weapon;
                        
HouseInfo[house][hAmmo][5] = ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else if(
HouseInfo[house][hWeapon][5] == weapon)
                    {
                        if(
HouseInfo[house][hAmmo][5] >= 25000) return SCM(playeridCOLOR_GREY,"* You cannot exceed the 25000 Limit.");
                        
SafeGivePlayerWeapon(playeridweapon, -ammo);
                        
HouseInfo[house][hAmmo][5] += ammo;
                        if(
PlayerInfo[playerid][pSex] == 1) { format(stringsizeof(string), "* %s takes out his %s and places it at his safe."GetPlayerNameEx(playerid),gunname); }
                        else { 
format(stringsizeof(string), "* %s takes out her %s and places it at her safe."GetPlayerNameEx(playerid),gunname); }
                        
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    }
                    else
                    {
                        
SCM(playeridCOLOR_GREY,"* This slot is taken by another weapon!");
                        
SCM(playeridCOLOR_GREY,"* Either deposit more ammo of the same weapon or load it up!");
                        return 
1;
                    }
                    
OnPropUpdate(1house);
                }
                else
                {
                    
SCM(playeridCOLOR_GREY,"* You don't have any weapon in your hand!");
                    return 
1;
                }
            }
            else
            {
                
SCM(playeridCOLOR_GREY,"* You're not on your House!");
                return 
1;
            }
        }
    }
    return 
1;




Re: What's Wrong with this Command ? - Sew_Sumi - 09.11.2014

This is where you use debugging in your log file, showing which steps it's turned up to with which values.

Such as where it's supposed to store, you make it do the copmmand, then use the same variables in a string to the log file saying that store was invoked, on the ammo line, with these variables. then maybe you'll see some more.


Re : What's Wrong with this Command ? - MCZOFT - 10.11.2014

really i cant get your point , can you explain again what are you trying to Say ?


Re: Re : What's Wrong with this Command ? - Sew_Sumi - 10.11.2014

Quote:
Originally Posted by MCZOFT
Посмотреть сообщение
really i cant get your point , can you explain again what are you trying to Say ?
You need debug points in your code... Various lines that show what variables the script is processing, and what values it got from those variables.


Anyways, so where's it failing and what messages is it giving to the client when these are processed?


Re : Re: Re : What's Wrong with this Command ? - MCZOFT - 10.11.2014

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
You need debug points in your code... Various lines that show what variables the script is processing, and what values it got from those variables.


Anyways, so where's it failing and what messages is it giving to the client when these are processed?
When thr client doing /store out house he says you are not in your house but when he is in his hose and doing that command its like nothing happens t ...


Re: What's Wrong with this Command ? - fall3n - 10.11.2014

Your string comparison is done with "params" and your mentioned names. "params" can contain amount/ammo, you split the string using sscanf already. So instead of using "params" for comparing string (strcmp) you should use "lname". Something I also want to point out is that while splitting you mentioned the string's size as 60 but it's only 24 on declaration.