[help] some little warnings in my script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [help] some little warnings in my script (
/showthread.php?tid=445966)
[help] some little warnings in my script -
myandyou - 23.06.2013
Код:
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?
Re: [help] some little warnings in my script -
Kindred - 23.06.2013
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);
}
}
}
Re: [help] some little warnings in my script -
myandyou - 23.06.2013
thnx