Jump to content
  • 0

Problema script server


AndrewTG01

Question

Problemă întâlnită (descriere): Am incercat sa fac un random jail spawn si imi da erorile de mai jos pe care nu stiu cum sa le rezolv
Ero(area / rile) / warning-(ul / urile):[pawn]error 032: array index out of bounds (variable "JailSpawns")

error 032: array index out of bounds (variable "JailSpawns")[/pawn]

Liniile de cod / sursa / script-ul: [pawn]SetPlayerPos(playa, JailSpawns[rand][0], JailSpawns[rand][1], JailSpawns[rand][2], JailSpawns[rand][3], JailSpawns[rand][4], JailSpawns[rand][5], JailSpawns[rand][6],JailSpawns[rand][7], JailSpawns[rand][8], JailSpawns[rand][9], JailSpawns[rand][10], JailSpawns[rand][11]);[/pawn]   [pawn]new Float:JailSpawns[12][3] = {

{1607,-1566.4,214},
{1599.9,-1566.6,214},
{1593.4,-1566.9,214},
{1586.4,-1567,214},
{1579.7,-1567,214},
{1572.7,-1566.6,214},
{1572.7,-1599.6,214},
{1579.2,-1599,214},
{1586.2,-1599.7,214},
{1592.8,-1599.3,214},
{1600.1,-1599.8,214},
{1607,-1600.1,214}

};[/pawn] 

Imagini / Video (optional): - 
Aţi încercat să rezolvaţi singur?: Da

Edited by AndrewTG01
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Incearca asa:

forward SetPlayerRandomSpawnJail( playerid );

public SetPlayerRandomSpawnJail( playerid )
{
    new rand = random( sizeof( JailSpawn ) );
    SetPlayerPos( playerid, JailSpawn[ rand ][ 0 ], JailSpawn[ rand ][ 1 ], JailSpawn[ rand ][ 2 ] );
    return ( 1 );
}

35012l1.png.aee1a3398b9bd9f8eec50574d2cd

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.