SA-MP Forums Archive
crashdetact plugins Please Help Me - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: crashdetact plugins Please Help Me (/showthread.php?tid=344609)



crashdetact plugins Please Help Me - Aloushi - 21.05.2012

Код:
[23:00:02] [debug] #12 0804b4c1 in __gxx_personality_v0 () from ./samp03svr
[23:00:02] [debug] #11 00882eac in __libc_start_main () from /lib/libc.so.6
[23:00:02] [debug] #10 08077c23 in ?? () from ./samp03svr
[23:00:02] [debug] #9  0807da9b in ?? () from ./samp03svr
[23:00:02] [debug] #8  080dcda5 in ?? () from ./samp03svr
[23:00:02] [debug] #7  f7d83b6e in ?? () from plugins/crashdetect.so
[23:00:02] [debug] #6  f7d7cb2b in crashdetect::HandleAmxExec () from plugins/crashdetect.so
[23:00:02] [debug] #5  f7d86db6 in amx_Exec () from plugins/crashdetect.so
[23:00:02] [debug] #4  080cbade in ?? () from ./samp03svr
[23:00:02] [debug] #3  ffffe500 in ?? ()
[23:00:02] [debug] #2  f7d84d4e in ?? () from plugins/crashdetect.so
[23:00:02] [debug] #1  f7d7fbbc in crashdetect::Crash () from plugins/crashdetect.so
[23:00:02] [debug] #0  f7d7d4ad in crashdetect::PrintNativeBacktrace () from plugins/crashdetect.so


my server shut down why




Another one




Код:
[23:00:02] [debug] #0  001c0a5c in public VehicleRespawn () from Faour.amx
Faour is name my gm

now what is my problem in vehicleresapwn

Код:
forward VehicleRespawn(playerid, vehicleid, ispassenger);
public VehicleRespawn(playerid, vehicleid, ispassenger)
{

    GameTextForPlayer(playerid,"~r~Vehicles ~g~Respawn",5000,5);
    for(new i = 0; i < MAX_VEHICLES; i ++ ) {
         for(new o = 0; o < GetMaxPlayers(); o ++ ) {
              if(!IsPlayerConnected(o)) continue;
              if(IsAnyBodyInVehicle(i)) continue;
              SetVehicleToRespawn(i);
              
         }
    }
    return 1;
}

stock IsAnyBodyInVehicle(vid) {
  for(new i = 0; i < GetMaxPlayers(); i ++ ) {
       if(IsPlayerInVehicle(i, vid)) return 1;
  }
  return 0;
}



Re: crashdetact plugins Please Help Me - [MG]Dimi - 21.05.2012

for(new o = 0; o < GetMaxPlayers(); o ++ ) {

This.
Chnage it to
pawn Код:
for(new o = 0, a = GetMaxPlayers(); o < a; o ++ )



Re: crashdetact plugins Please Help Me - Aloushi - 21.05.2012

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
for(new o = 0; o < GetMaxPlayers(); o ++ ) {

This.
Chnage it to
pawn Код:
for(new o = 0, a = GetMaxPlayers(); o < a; o ++ )
~Thanks~


Код:
forward VehicleRespawn(playerid, vehicleid, ispassenger);
public VehicleRespawn(playerid, vehicleid, ispassenger)
{

    GameTextForPlayer(playerid,"~r~Vehicles ~g~Respawn",5000,5);
    for(new i = 0; i < MAX_VEHICLES; i ++ ) {
         for(new o = 0, a = GetMaxPlayers(); o < a; o ++ ) { <<<<<<<<<<<<<< im change this 
              if(!IsPlayerConnected(o)) continue;
              if(IsAnyBodyInVehicle(i)) continue;
              SetVehicleToRespawn(i);
              
         }
    }
    return 1;
}

stock IsAnyBodyInVehicle(vid) {
  for(new i = 0; i < GetMaxPlayers(); i ++ ) {  <<<<<<<<<<< this need to change ?
       if(IsPlayerInVehicle(i, vid)) return 1;
  }
  return 0;
}



Re: crashdetact plugins Please Help Me - ViniBorn - 22.05.2012

Do the same thing ...
Is more optimized


Re: crashdetact plugins Please Help Me - [MG]Dimi - 22.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Do the same thing ...
Is more optimized
First way he did crashes my compiler...