23.06.2009, 23:28
This is my error code:
and this is the script
Does anyone knows what the problem is? The first 2 errors are in the bold line if someone knows how to fix it then I will try to fix the other on my own.
pawn Код:
C:\Documents and Settings\Joeri\Bureaublad\penls.pwn(9273) : warning 209: function "GetDistanceBetweenPlayers" should return a value
C:\Documents and Settings\Joeri\Bureaublad\penls.pwn(9273) : warning 209: function "GetDistanceBetweenPlayers" should return a value
C:\Documents and Settings\Joeri\Bureaublad\penls.pwn(9455) : warning 209: function "GetDistanceBetweenPlayers" should return a value
C:\Documents and Settings\Joeri\Bureaublad\penls.pwn(9488) : warning 209: function "GetDistanceBetweenPoints" should return a value
C:\Documents and Settings\Joeri\Bureaublad\penls.pwn(9503) : warning 209: function "GetDistanceBetweenPoints" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 5812 bytes
Code size: 754996 bytes
Data size: 508576 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4910 cells (19640 bytes)
Total requirements: 1285768 bytes
5 Warnings.
pawn Код:
if (strcmp(cmd,"/drugsearch",true)==0) {
new a;
if(gTeam[playerid] == 2) {
for(new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && i != playerid)
{
[b]if (GetDistanceBetweenPlayers(i,playerid) < 4) {[/b]
if (Drugs[i] > 0) {
new txt[256];
new pname[MAX_PLAYER_NAME];
GetPlayerName(i,pname,sizeof(pname));
format(txt,sizeof(txt),"You have confiscated %d grams of drugs off %s",Drugs[i],pname);
SendClientMessage(playerid,COLOR_GREEN,txt);
format(txt,sizeof(txt),"You have been caught with %d grams of drugs on you",Drugs[i]);
SendClientMessage(i,COLOR_RED,txt);
FlashTime[i] = 10;
Drugs[i] = 0;
a++;
return 1;
}
}
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"Only cops can do this");
return 1;
}
if (a==0) {
SendClientMessage(playerid,COLOR_RED,"Nobody near you had any drugs");
return 1;
}
}