07.03.2015, 00:30
I know I can just make a separate function and this would go well, but I was just testing things out. Here is the code.
Here is the log.
How exactly should inline be used in this case? I tried using and using inline, but those failed.
pawn Код:
new rand = Iter_Random(Object), count = Iter_Count(Object), playerid = Iter_Random(PlayersIn);
inline GetObject()
{
foreach(new objectid: Object)
{
new Float:P[3];
GetObjectPos(objectid, P[0], P[1], P[2]);
if(IsPlayerInRangeOfPoint(playerid, 2.0, P[0], P[1], P[2]))
{
rand = objectid;
break;
}
}
}
rand = random(2) ? rand : GetObject(); // LINE 45
Quote:
Originally Posted by Compiler Output
...(45) : error 012: invalid function call, not a valid address
...(45) : error 029: invalid expression, assumed zero ...(45) : warning 215: expression has no effect |