[Tutorial] Random spawns
#18

Sorry for the bump but...when Im trying to compile I get this error and I did exactly as you explained.

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
My code (from what you explained)

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
};
And OnPlayerSpawn
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;
}
??
Reply


Messages In This Thread
Random spawns (Explained) - by FUNExtreme - 23.07.2010, 18:27
Re: Random spawns - by Kar - 23.07.2010, 18:29
Re: Random spawns - by FUNExtreme - 23.07.2010, 18:36
Re: Random spawns - by Finn - 23.07.2010, 18:46
Re: Random spawns - by TouR - 23.07.2010, 18:48
Re: Random spawns - by FUNExtreme - 23.07.2010, 19:01
Re: Random spawns - by TouR - 23.07.2010, 19:02
Re: Random spawns - by XtremePlanet - 25.07.2010, 08:26
Re: Random spawns - by hab2ever - 25.07.2010, 08:58
Re: Random spawns - by ViruZZzZ_ChiLLL - 25.07.2010, 09:37
Re: Random spawns - by FUNExtreme - 25.07.2010, 12:11
Re: Random spawns - by pmk1 - 11.08.2010, 17:49
Re: Random spawns - by Min - 13.08.2010, 15:31
Re: Random spawns - by Lorenc_ - 13.08.2010, 22:34
Re: Random spawns - by AiVAMAN - 23.08.2010, 09:10
Re: Random spawns - by FUNExtreme - 16.10.2010, 20:13
Re: Random spawns - by Aleluja - 17.10.2010, 08:00
Re: Random spawns - by Hudgens - 02.01.2011, 17:31
Re: Random spawns - by FUNExtreme - 02.01.2011, 17:33
Re: Random spawns - by Hudgens - 02.01.2011, 17:40
Re: Random spawns - by Guest9328472398472 - 14.05.2012, 10:43
Re: Random spawns - by JustinAn - 08.06.2012, 17:49
Re: Random spawns - by Dodo9655 - 10.06.2012, 12:03
Re: Random spawns - by [A]ndrei - 29.06.2012, 05:11
Re: Random spawns - by ErzaNatsu - 30.06.2012, 01:03
Re: Random spawns - by Captain_Mani - 08.08.2012, 07:16
Re: Random spawns - by Coder_ - 16.10.2012, 21:52
Re: Random spawns - by donhu789 - 26.04.2013, 07:22
Re: Random spawns - by Wickeed - 13.06.2013, 11:14
AW: Random spawns - by Blackazur - 13.06.2013, 11:17
Re: Random spawns - by AnonScripter - 12.09.2013, 10:43
Re: Random spawns - by FUNExtreme - 12.09.2013, 15:57
Re: Random spawns - by xVIP3Rx - 09.12.2013, 14:24
Re: Random spawns - by haZh - 25.08.2014, 03:01
Re: Random spawns - by Glossy42O - 06.11.2014, 17:29
Re: Random spawns - by jamesmith12 - 18.07.2015, 14:53
Re: Random spawns - by SteSte - 06.04.2016, 01:32
Re: Random spawns - by SteSte - 06.04.2016, 01:34
Re: Random spawns - by JohnBlaze1971 - 06.04.2016, 04:13
Re: Random spawns - by Kenxxx - 19.04.2016, 05:50
Re: Random spawns - by itsCody - 19.04.2016, 06:21
Re: Random spawns - by HumbleGuy - 27.07.2016, 21:49
Re: Random spawns - by WhiteGhost - 27.07.2016, 21:53
Re: Random spawns - by Dakin - 18.02.2018, 18:37
Re: Random spawns - by sanyaretro - 26.01.2019, 18:39
Re: Random spawns - by faxxe - 27.01.2019, 16:39
Re: Random spawns - by SymonClash - 27.01.2019, 20:21

Forum Jump:


Users browsing this thread: 44 Guest(s)