04.04.2015, 21:05
I have a problem with a command.When I try to run the server it crashes while initializing.Here is the problematic stuff
If I remove(or just comment the first 4 lines,the server starts without problems.I tried everything but nothing works.It recompiles perfectly but crashes on initializing.
Just for info-LastLoadedLoc is the sizeof Locations that I have created.I tried replacing it with sizeof(LastLoadedLoc),with random(sizeof(Loads[PInfo[playerid][Load]][Loc1][LastLoadedLoc])); but nothing works.
pawn Код:
PInfo[playerid][Load]=random(sizeof(Loads));
while(vtype!=Loads[PInfo[playerid][Load]][VType]) PInfo[playerid][Load]=random(sizeof(Loads));
PInfo[playerid][LoadLoc][0]=random(Loads[PInfo[playerid][Load]][Loc1][LastLoadedLoc]);
PInfo[playerid][UnloadLoc][0]=random(Loads[PInfo[playerid][Load]][Loc2][LastLoadedLoc]);
x=LocInfo[PInfo[playerid][LoadLoc][0]][lX];
y=LocInfo[PInfo[playerid][LoadLoc][0]][lY];
z=LocInfo[PInfo[playerid][LoadLoc][0]][lZ];
PInfo[playerid][JobVeh]=vid;
PInfo[playerid][JobTr]=tid;
SetPlayerCheckpoint(playerid,x,y,z,7);
Just for info-LastLoadedLoc is the sizeof Locations that I have created.I tried replacing it with sizeof(LastLoadedLoc),with random(sizeof(Loads[PInfo[playerid][Load]][Loc1][LastLoadedLoc])); but nothing works.