KinNg Posted June 18, 2013 Report Share Posted June 18, 2013 Imi puteti spune cum as putea rezolva eroarea :D:\Users\VRD\Desktop\FictiveGaminG\gamemodes\fgaming_KinNg.pwn(13293) : error 032: array index out of bounds (variable "spawn") => functia: // Player Class's for(new i = 0; i <= sizeof(Peds)-1; i++) { new spawns = random ( sizeof ( spawn ) ) ; AddPlayerClass(Peds[i][0],spawn [ spawns ] [ 0 ] , spawn [ spawns ] [ 1 ] , spawn [ spawns ] [ 2 ], spawn[ spawns] [ 3 ], spawn[ spawns ] [ 4 ], spawn [spawns][5],269.1425,-1,-1,-1,-1,-1,-1); } => LINIA cu pricina: AddPlayerClass(Peds[i][0],spawn [ spawns ] [ 0 ] , spawn [ spawns ] [ 1 ] , spawn [ spawns ] [ 2 ], spawn[ spawns] [ 3 ], spawn[ spawns ] [ 4 ], spawn [spawns][5],269.1425,-1,-1,-1,-1,-1,-1); Link to comment Share on other sites More sharing options...
KinNg Posted June 19, 2013 Author Report Share Posted June 19, 2013 UP ! Stie cineva ce as putea face?:D Link to comment Share on other sites More sharing options...
Gireada Posted June 19, 2013 Report Share Posted June 19, 2013 sterge spawn Link to comment Share on other sites More sharing options...
burnfire Posted June 19, 2013 Report Share Posted June 19, 2013 pune in loc de [pawn]new spawns = random ( sizeof ( spawn ) ) ;[/pawn] pune asa:[pawn]new randspawns = random(sizeof(spawn));[/pawn] Link to comment Share on other sites More sharing options...
MAC1 Posted June 19, 2013 Report Share Posted June 19, 2013 pune in loc de [pawn]new spawns = random ( sizeof ( spawn ) ) ;[/pawn] pune asa:[pawn]new randspawns = random(sizeof(spawn));[/pawn]Realizezi ca tu i-ai spus acolo doar sa modifice numele unei variabile? In plus, o sa-i dea erori pentru ca variabila "spawns" nu o sa mai existe, iar el o foloseste putin mai jos.@KinNg -> Cate elemente are tabloul bidimensional numit "spawn"?Sau mai bine pune aici liniile in care l-ai declarat. Link to comment Share on other sites More sharing options...
burnfire Posted June 19, 2013 Report Share Posted June 19, 2013 Poi el trebuie sa inlocuiasca,logic =)) Link to comment Share on other sites More sharing options...
MAC1 Posted June 19, 2013 Report Share Posted June 19, 2013 Poi el trebuie sa inlocuiasca,logic =))Nu ai inteles prea bine la ce ma refeream.Ce ai facut tu acolo e ca si cum un om bolnav de cancer si-ar schimba numele ca sa scape de boala. Adica pur si simplu redenumesti o variabila, nu schimbi absolut nimic in functionalitatea algoritmului.Poti sa schimbi numele variabilelor ani intregi, ca problema va exista in continuare. Link to comment Share on other sites More sharing options...
KinNg Posted June 19, 2013 Author Report Share Posted June 19, 2013 Problema rezolvata, am reusit pana la urma sa-i dau de cap. +1 pentru cei ce au incercat sa ma ajute. Multumesc inca odata Link to comment Share on other sites More sharing options...
Question
KinNg
Imi puteti spune cum as putea rezolva eroarea :
=> functia: => LINIA cu pricina:Link to comment
Share on other sites
7 answers to this question
Recommended Posts