[help] some little warnings in my script
#1

Код:
warning 202: number of arguments does not match definition

Код:
 new Menu:current;
    current = GetPlayerMenu(playerid);
    if(current == menudildo)
    {
        switch(row)
        {
            case 0:{
	GivePlayerWeapon(playerid, 10); //<-------------- warning
            }
            case 1:{
	GivePlayerWeapon(playerid, 11); //<-------------- warning
            }
            case 2:{
	GivePlayerWeapon(playerid, 12); //<-------------- warning
            }
            case 3:{
	GivePlayerWeapon(playerid, 13); //<-------------- warning
            }
        }
    }
can someone help me?
Reply
#2

First off, please have the decency to use common sense before coming here and asking us for help.

Second off, this is obviously not going to work. You forgot the ammo parameter.

pawn Код:
//Wrong
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == menudildo)
{
    switch(row)
    {
        case 0:{
            GivePlayerWeapon(playerid, 10); //<-------------- warning
        }
        case 1:{
            GivePlayerWeapon(playerid, 11); //<-------------- warning
        }
        case 2:{
            GivePlayerWeapon(playerid, 12); //<-------------- warning
        }
        case 3:{
            GivePlayerWeapon(playerid, 13); //<-------------- warning
        }
    }
}

//Right
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == menudildo)
{
    switch(row)
    {
        case 0:{
            GivePlayerWeapon(playerid, 10, ammoamounthere);
        }
        case 1:{
            GivePlayerWeapon(playerid, 11, ammoamounthere);
        }
        case 2:{
            GivePlayerWeapon(playerid, 12, ammoamounthere);
        }
        case 3:{
            GivePlayerWeapon(playerid, 13, ammoamounthere);
        }
    }
}
Reply
#3

thnx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)