A Few Warnings
#1

Hey guys... This is my code:

Код:
CMD:buyclothes(playerid, params[])
{
	new string[128];
	new clothes;
	if(!IsPlayerInRangeOfPoint(playerid, 10, 204.3303,-159.8711,1000.5234 || 203.7879,-43.2690,1001.8047 || 206.3741,-8.1265,1001.2109 || 161.5538,-83.7009,1001.8047 || 207.0033,-129.1799,1003.5078))
	return SendClientMessage(playerid, COLOR_ORANGE, "{E5AC00}SERVER: {FFFFFF}You are not at the clothes shop!");
    if(sscanf(params,"i",clothes)) return SendClientMessage(playerid, COLOR_ORANGE, "{E5AC00}SERVER: {FFFFFF}USAGE: /buyclothes [Skin ID]");
    format(string, sizeof(string), "{E5AC00}SERVER:{FFFFFF} You have purchased your clothes.(ID: %d).",clothes);
	SendClientMessage(playerid,COLOR_ORANGE,string);
	GivePlayerMoney(playerid, -100);
	PlayerInfo[playerid][Skin] = clothes;
	SetPlayerSkin(playerid, clothes);
	return 1;
}
and these are the warnings I get and the code doesn't work :/

Код:
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 213: tag mismatch
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\Fort Carson Roleplay\gamemodes\roleplay.pwn(7905) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Warnings.
Reply
#2

which line ?
Reply
#3

Lines 7905:
Код:
if(!IsPlayerInRangeOfPoint(playerid, 10, 204.3303,-159.8711,1000.5234 || 203.7879,-43.2690,1001.8047 || 206.3741,-8.1265,1001.2109 || 161.5538,-83.7009,1001.8047 || 207.0033,-129.1799,1003.5078))
Reply
#4

You forgot the "playerid" after each ||
Reply
#5

try this
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 10, 204.3303,-159.8711,1000.5234) || IsPlayerInRangeOfPoint(playerid,203.7879,-43.2690,1001.8047) || IsPlayerInRangeOfPoint(playerid,206.3741,-8.1265,1001.2109) || IsPlayerInRangeOfPoint(playerid,161.5538,-83.7009,1001.8047) || IsPlayerInRangeOfPoint(playerid,207.0033,-129.1799,1003.5078))
+rep if i helped you
Reply
#6

Quote:
Originally Posted by simo0000
Посмотреть сообщение
try this
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 10, 204.3303,-159.8711,1000.5234) || IsPlayerInRangeOfPoint(playerid,203.7879,-43.2690,1001.8047) || IsPlayerInRangeOfPoint(playerid,206.3741,-8.1265,1001.2109) || IsPlayerInRangeOfPoint(playerid,161.5538,-83.7009,1001.8047) || IsPlayerInRangeOfPoint(playerid,207.0033,-129.1799,1003.5078))
+rep if i helped you
That is still not going to work the way he wants it to work. You have to place the exclamation mark before every 'IsPlayerInRangeOfPoint' not just the first one.
Reply
#7

pawn Код:
#pragma tabsize 0
Try adding that at the top

+rep if I helped you..
Reply
#8

Quote:
Originally Posted by LazyBoyyyy
Посмотреть сообщение
pawn Код:
#pragma tabsize 0
Try adding that at the top

+rep if I helped you..
How is that going to solve anything? Way out of context.

It should look like this:
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 10, 204.3303,-159.8711,1000.5234) && !IsPlayerInRangeOfPoint(playerid,203.7879,-43.2690,1001.8047) && !IsPlayerInRangeOfPoint(playerid,206.3741,-8.1265,1001.2109) && !IsPlayerInRangeOfPoint(playerid,161.5538,-83.7009,1001.8047) && !IsPlayerInRangeOfPoint(playerid,207.0033,-129.1799,1003.5078))
You are also using the wrong the wrong control structures. This snippet of code will only work when the player is at all these locations at the same moment.
Reply
#9

Quote:
Originally Posted by Bible
Посмотреть сообщение
How is that going to solve anything? Way out of context.
That is used to remove the warnings for number of arguments doesn't match definition..
Reply
#10

Quote:
Originally Posted by LazyBoyyyy
Посмотреть сообщение
That is used to remove the warnings for number of arguments doesn't match definition..
It is still not going to fix any thing other than remove the error message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)