19.01.2013, 17:27
Hello there, I were making rob for my gamemode and i have some weird stuff going on under this thing. I found in forum this
And then when i compile i got errors in this line
Can someone help me to find out the problem?
Thanks ya all.
pawn Код:
forward Float:GetDistanceBetweenPlayers(p1,p2);
public Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
{
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}]
pawn Код:
format(string,sizeof(string),"You have robbed $%d from %s(%d).",mrand,PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_RED,string);
pawn Код:
(5644) : error 012: invalid function call, not a valid address
(5644) : warning 215: expression has no effect
(5644) : error 001: expected token: ";", but found ")"
(5644) : error 029: invalid expression, assumed zero
(5644) : fatal error 107: too many error messages on one line
Thanks ya all.