02.11.2012, 12:43
(
Последний раз редактировалось Edvin; 02.11.2012 в 13:14.
)
Hi guys
I need some help with these debugs printed by crashdetect:
First:
Line:
16730: if ( PlayerInfo[ playerid ][ HideTDSSSS ] == 0 )
Full function:
18149: GivePlayerMoney( i, 100000 );
Second:
Lines:
5423: SetPlayerRaceCheckpoint( playerid, 1, DriveJob[ CheckpoinID[ playerid ] ][ 0 ], DriveJob[ CheckpoinID[ playerid ] ][ 1 ], DriveJob[ CheckpoinID[ playerid ] ][ 2 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 0 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 1 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 2 ], 5 );
Part of code:
Third:
Lines:
13617: PlayerPlaySound( playerid, 1139, 0.0, 0.0, 0.0 );
All "StartRace" function:
Fourth:
Line:
13471: mysql_get_field( "CP_X", extract_field ); Drift_Data[ drift_id ][ check_x ] = floatstr( extract_field );
Also, I have a problem, and I don't know the reason ... sometimes, when I want to enter on the server, and click on"Spawn" button, my SA-MP crashes, and also, for other players.
Please help me if you know how to solve these debugs. Thanks.
I need some help with these debugs printed by crashdetect:
First:
Код:
[12:22:19] [debug] #0 000c284c in Announce (playerid=50, zString[]=@0x00155334 "~g~~h~Minigame has been ~r~~h~...", liTime=3000, liStile=4) at D:\WOS\Build 26\gamemodes\WOS.pwn:16730 [12:22:19] [debug] #1 000d2fc0 in public cmd_leave (playerid=8, params[]=@0x001b6520 "") at D:\WOS\Build 26\gamemodes\WOS.pwn:18149
16730: if ( PlayerInfo[ playerid ][ HideTDSSSS ] == 0 )
Full function:
Код:
stock Announce( playerid, zString[ ], liTime, liStile ) { if ( PlayerInfo[ playerid ][ HideTDSSSS ] == 0 ) GameTextForPlayer( playerid, zString, liTime, liStile ); return 1; }
Second:
Код:
[09:53:39] [debug] Run time error 4: "Array index out of bounds" [09:53:39] [debug] Accessing element at index 28 past array upper bound 27 [09:53:39] [debug] Backtrace: [09:53:39] [debug] #0 0003a4a4 in public Streamer_OnPlayerEnterRaceCP (playerid=2) at D:\WOS\Build 26\gamemodes\WOS.pwn:5423 [09:53:39] [debug] #1 00008cd0 in public OnPlayerEnterRaceCheckpoint (playerid=2) at D:\WOS\Build 26\pawno\include\streamer.inc:481
5423: SetPlayerRaceCheckpoint( playerid, 1, DriveJob[ CheckpoinID[ playerid ] ][ 0 ], DriveJob[ CheckpoinID[ playerid ] ][ 1 ], DriveJob[ CheckpoinID[ playerid ] ][ 2 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 0 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 1 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 2 ], 5 );
Part of code:
Код:
case 26: { CheckpoinID[ playerid ]++; SetPlayerRaceCheckpoint( playerid, 1, DriveJob[ CheckpoinID[ playerid ] ][ 0 ], DriveJob[ CheckpoinID[ playerid ] ][ 1 ], DriveJob[ CheckpoinID[ playerid ] ][ 2 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 0 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 1 ], DriveJob[ CheckpoinID[ playerid ]+1 ][ 2 ], 5 ); ShowJobTextDraws( playerid, CheckpoinID[ playerid ], JobsReward, JobsReward2, 27 ); }
Код:
[08:30:23] [debug] Run time error 4: "Array index out of bounds" [08:30:23] [debug] Accessing element at index 50 past array upper bound 49 [08:30:23] [debug] Backtrace: [08:30:23] [debug] #0 000c284c in Announce (playerid=50, zString[]=@0x000ad38c "~b~~h~2", liTime=999, liStile=5) at D:\WOS\Build 26\gamemodes\WOS.pwn:16730 [08:30:23] [debug] #1 0009b740 in public StartRace (RaceID=7) at D:\WOS\Build 26\gamemodes\WOS.pwn:13617
13617: PlayerPlaySound( playerid, 1139, 0.0, 0.0, 0.0 );
All "StartRace" function:
Код:
function StartRace( RaceID ) { gsString[ 0 ] = EOS; switch( R_DATA[ RaceID ][ r_CountDown ] ) { case 0: { RaceTick[ RaceID ] = GetTickCount( ); R_DATA[ RaceID ][ r_Playing ] = 1; DestroyDynamicRaceCP( R_DATA[ RaceID ][ r_CP ] ); KillTimer( R_DATA[ RaceID ][ r_Count ] ); foreach(new i: r_Joined[RaceID]) { TogglePlayerControllable( i, true ); PlayerPlaySound( i, 1057, 0.0, 0.0, 0.0 ); Announce( i, "~r~~h~GO!~n~~y~~h~GO!~n~~g~~h~GO!", 2000, 5 ); SetPlayerRaceCheckpoint( i, 0, Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 1 ][ gfRace_X ], Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 1 ][ gfRace_Y ], Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 1 ][ gfRace_Z ], Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 2 ][ gfRace_X ], Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 2 ][ gfRace_Y ], Race_Checkpoint[ PlayerInfo[ i ][ Race_CP ] ][ 2 ][ gfRace_Z ], 10.0 ); PlayerInfo[ i ][ ActionID ] = 8; SetPlayerVirtualWorld( i, 10 ); SetVehicleVirtualWorld( GetPlayerVehicleID( i ), GetPlayerVirtualWorld( i ) ); } } case 1 .. 5: { if(Iter_Count(r_Joined[RaceID]) <= 0) return StopRace( RaceID ), KillTimer( R_DATA[ RaceID ][ r_Count ] ); format( gsString, 56, "~b~~h~%d", R_DATA[ RaceID ][ r_CountDown ] ); foreach(new i: r_Joined[RaceID]) { if ( !IsPlayerInDynamicRaceCP( i, R_DATA[ RaceID ][ r_CP ] ) ) { RemovePlayerFromRace( i, RaceID ); new next; Iter_SafeRemove(r_Joined[RaceID], i, next); i = next; } TogglePlayerControllable( i, false ); Announce( i, gsString, 999, 5 ); PlayerPlaySound( playerid, 1139, 0.0, 0.0, 0.0 ); } } case 20, 10: { R_DATA[ RaceID ][ r_Started ] = 1; format( gsString, sizeof gsString, "RACE: {FFFFFF}\"{FF0000}%s{FFFFFF}\" starting in %d seconds. Type \"{FF0000}/join %d{FFFFFF}\" to join the race.", R_DATA[ RaceID ][ r_Name ], R_DATA[ RaceID ][ r_CountDown ], RaceID ); SendClientMessageToAll( COLOR_ABLUE, gsString ); } } return R_DATA[ RaceID ][ r_CountDown ]--; }
Код:
[07:33:57] [debug] Run time error 4: "Array index out of bounds" [07:33:57] [debug] Accessing element at index 50 past array upper bound 14 [07:33:57] [debug] Backtrace: [07:33:57] [debug] #0 00099264 in public OnQueryFinish (query[]=@0x001b6504 "", resultid=28, extraid=-1, connectionHandle=1) at D:\WOS\Build 26\gamemodes\WOS.pwn:13471
13471: mysql_get_field( "CP_X", extract_field ); Drift_Data[ drift_id ][ check_x ] = floatstr( extract_field );
Also, I have a problem, and I don't know the reason ... sometimes, when I want to enter on the server, and click on"Spawn" button, my SA-MP crashes, and also, for other players.
Please help me if you know how to solve these debugs. Thanks.