02.01.2011, 17:31
Sorry for the bump but...when Im trying to compile I get this error and I did exactly as you explained.
My code (from what you explained)
This is outside any function.
And OnPlayerSpawn
??
Code:
TDM.pwn(516) : error 017: undefined symbol "RandomPlayerSpawns" TDM.pwn(516) : error 029: invalid expression, assumed zero TDM.pwn(516) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB
This is outside any function.
Code:
new Float:RandomSpawns[][] = { {2319.2280,-1651.7455,14.1590,143.4542}, // Randomspawngrove {2175.5120,-1672.8800,16.5499,116.5022}, // Randomspawnballas {1920.5571,-1401.1272,13.5703,302.2050}, // Randomspawnskatepark {2005.1017,-2437.9197,13.5469,358.3744}, // Randomspawnlsair {-2302.4067,-1654.1744,483.4206,295.6445}, // Randomspawnchilliad (1695.7886,-2133.8210,144.4791,340.6445), //Randomspawnbigjump (1240.2787,-2951.0051,193.1163,340.6445) //Randomspawnstuntjump };
Code:
public OnPlayerSpawn(playerid) { ((this is line 516))new Random = random(sizeof(RandomPlayerSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); return 1; }