Error 012: invalid function call, not a valid address
#1

Code:
Код:
stock SendNearbyMessage(playerid, Float:radius, string[], col)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	new Float:ix, Float:iy, Float:iz;
	new Float:cx, Float:cy, Float:cz;
	foreach(Player, i)
	{
	    if(LoggedIn(i))
	    {
	        if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
	        {
				GetPlayerPos(i, ix, iy, iz);
				cx = (x - ix);
				cy = (y - iy);
				cz = (z - iz);
				if(((cx < radius/16) && (cx > -radius/16)) && ((cy < radius/16) && (cy > -radius/16)) && ((cz < radius/16) && (cz > -radius/16)))
				{
				    SendClientMessage(i, col, string);
				}
			}
	    }
	}
	return 1;
}
Error line:
Код:
 if(LoggedIn(i))
Error:
Код:
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#2

Show stock LoggedIn code.
Reply
#3

Its
new LoggedIn[MAX_PLAYERS];
Reply
#4

pawn Код:
if(LoggedIn(i))
To:

pawn Код:
if(LoggedIn[i])
Reply
#5

from:
Quote:

if(LoggedIn(i))

to:
Quote:

if(LoggedIn[i])

Reply
#6

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)