Arguments do not match definition
#1

Hello guys im getting some weird errors right now and I cant see the actual problem so I came here asking for your help.
These are the following errors:
Код:
(572) : warning 202: number of arguments does not match definition
(573) : warning 202: number of arguments does not match definition
These are lines 572 & 573:
Код:
CMD:dgun(playerid, params[]) return cmd_dropgun(playerid);
CMD:pgun(playerid, params[]) return cmd_pickupgun(playerid);
and these are the original cmds:
Код:
CMD:dropgun(playerid,params[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
    new GunID = GetPlayerWeapon(playerid);
    new GunAmmo = GetPlayerAmmo(playerid);
    if(GunID > 0 && GunAmmo != 0)
    {
        new f = MAX_OBJ+1;
        for(new a = 0; a < MAX_OBJ; a++)
        {
            if(dGunData[a][ObjPos][0] == 0.0)
            {
                f = a;
                break;
            }
        }
	    if(f > MAX_OBJ) return SendClientMessage(playerid, 0x33AA3300, "You can not throw weapons at the moment, try back later!");
	    RemovePlayerWeapon(playerid, GunID);
	    dGunData[f][ObjData][0] = GunID;
	    dGunData[f][ObjData][1] = GunAmmo;
	    GetPlayerPos(playerid, dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]);
	    dGunData[f][ObjID] = CreateObject(GunObjects[GunID], dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]-1, 93.7, 120.0, 120.0);
	    new buffer[50];
	    format(buffer, sizeof(buffer), "You threw %s", GunNames[dGunData[f][ObjData][0]]);
	    SendClientMessage(playerid, 0x37DB45, buffer);
        }
	return 1;
}

CMD:pickupgun(playerid,params[])
{
	if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
	new f = MAX_OBJ+1;
	for(new a = 0; a < MAX_OBJ; a++)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, dGunData[a][ObjPos][0], dGunData[a][ObjPos][1], dGunData[a][ObjPos][2]))
	    {
            f = a;
	        break;
	    }
	}
	if(f > MAX_OBJ) return SendClientMessage(playerid, 0x33AA3300, "You are not near the weapon which you can pick up!");
	DestroyObject(dGunData[f][ObjID]);
	GivePlayerWeapon(playerid, dGunData[f][ObjData][0], dGunData[f][ObjData][1]);
	dGunData[f][ObjPos][0] = 0.0;
	dGunData[f][ObjPos][1] = 0.0;
	dGunData[f][ObjPos][2] = 0.0;
	dGunData[f][ObjID] = -1;
	dGunData[f][ObjData][1] = 0;
	new buffer[50];
	format(buffer, sizeof(buffer), "You picked up %s", GunNames[dGunData[f][ObjData][0]]);
	SendClientMessage(playerid, 0x37DB45, buffer);
	return 1;
}
Please help me solve this issue.
Reply
#2

pawn Код:
CMD:dgun(playerid, params[]) return cmd_dropgun(playerid, params);
CMD:pgun(playerid, params[]) return cmd_pickupgun(playerid, params);
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
CMD:dgun(playerid, params[]) return cmd_dropgun(playerid, params);
CMD:pgun(playerid, params[]) return cmd_pickupgun(playerid, params);
Thank you Konstantinos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)