SA-MP Forums Archive
1 warning - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 1 warning (/showthread.php?tid=168414)



1 warning - stix - 16.08.2010

number of arguments does not match definition, i made a buy command i want the player to be at a certain point but also a interior which is 24/7 interior, i tried everything but i still get 1 warning

number of arguments does not match definition

this is the command

if (strcmp("/buy", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -28.1007,-89.9386,1003.5469) && GetPlayerInterior(playerid, 1) return SendClientMessage(playerid,COLOR_WHITE,"You are not in any 24/7 store!");
{
TogglePlayerControllable(playerid,0);
ShowMenuForPlayer(Store,playerid);
}
return 1;
}

and this is the buggy line

if(IsPlayerInRangeOfPoint(playerid, 4.0, -28.1007,-89.9386,1003.5469) && GetPlayerInterior(playerid, 1) return SendClientMessage(playerid,COLOR_WHITE,"You are not in any 24/7 store!");


Re: 1 warning - eDz0r - 16.08.2010

i think is the getplayerinterior make something like this

pawn Код:
if (strcmp("/buy", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -28.1007,-89.9386,1003.5469)
{
if(GetPlayerInterior(playerid) == 1)
{



Re: 1 warning - stix - 16.08.2010

ok thanks alot man you helped me to fix it

thanks for your time and cooperation


Re: 1 warning - eDz0r - 16.08.2010

if you say to me thanks im glad to help you


Re: 1 warning - stix - 16.08.2010

thanks to both of you


Re: 1 warning - wups - 16.08.2010

Nope thats wrong. If a player is in an interior 1, not even close to the shop - the menu will still open.
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 4, -28.1007,-89.9386,1003.5469) && GetPlayerInterior(playerid) == 1) return SendClientMessage(playerid,COLOR_WHITE,"You are not in any 24/7 store!");