Plugin Error in Log

Сообщения
256
Реакции
12
Ошибка
Plugin error
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5399
Билд
ReHLDS version: 3.7.0.696-dev
ReGamedll
ReGameDLL version: 5.18.0.469-dev
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5399 ini Start ANY
[ 3] Reunion RUN - reunion_mm_i386.so v0.1.0.135 ini Start Never
[ 4] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 5] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[ 8] MySQL RUN - mysql_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[ 9] Fun RUN - fun_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[10] Engine RUN - engine_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[12] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[13] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5399 pl2 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386.so v5.14.0.195-dev pl2 ANY Never
[16] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[17] gRIP RUN - grip_amxx_i386.so v0.1.5 Beta pl2 ANY ANY
Список плагинов
Currently loaded plugins:
id name version author url file status
[ 1] 0 FreshBans 1.4.3b kanagava unknown fresh_bans_ running
[ 2] 1 Anti-ChatSpam 0.6.1 Exolent anti_chat_s running
[ 3] 2 Chat Manager 4.5 OciXCrom crx_chatman debug
[ 4] 3 Advanced Gag 1.9.0 neygomon amx_gag.amx debug
[ 5] 4 World Model Group 1.1 w0w world_model running
[ 6] 5 Reason Kicker 2.0 xSd Reasons running
[ 7] 6 ReAimDetector API 0.2.2 ReHLDS Team reaimdetect running
[ 8] 7 Reklama 20.05.2020 mx?! reklama.amx running
[ 9] 8 Admin Base 1.10.0.539 AMXX Dev Team admin.amxx running
[ 10] 9 Commands Menu 1.10.0.539 AMXX Dev Team cmdmenu.amx running
[ 11] 10 Players Menu 1.10.0.539 AMXX Dev Team plmenu.amxx running
[ 12] 11 Plugin Menu 1.10.0.539 AMXX Dev Team pluginmenu. running
[ 13] 12 Nextmap Chooser 1.10.0.539 AMXX Dev Team mapchooser. running
[ 14] 13 Pause Plugins 1.10.0.539 AMXX Dev Team pausecfg.am running
[ 15] 14 Stats Configuration 1.10.0.539 AMXX Dev Team statscfg.am running
[ 16] 15 Restrict Weapons 1.10.0.539 AMXX Dev Team restmenu.am running
[ 17] 16 StatsX 1.10.0.539 AMXX Dev Team statsx.amxx running
[ 18] 17 CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sq running
[ 19] 18 Admin Chat 1.10.0.539 AMXX Dev Team rinf-adminc running
[ 20] 19 Admin Votes 1.10.0.539 AMXX Dev Team rinf-adminv running
[ 21] 20 Maps Menu 1.0.114 voed rinf-mapsme running
[ 22] 21 Admin Commands 1.10.0.539 AMXX Dev Team rinf-adminc running
[ 23] 22 Menus Front-End 1.10.0.539 AMXX Dev Team rinf-menufr running
[ 24] 23 Mode 2x2 2.5re s1lent mode.amxx running
[ 25] 24 Shove Mod 2.5 Styles shove_ex.am debug
[ 26] 25 fb_forwards 0.1.4 Kanagava & Realu fb_forwards running
[ 27] 26 [ReAPI:AMXX] Buy Nades 0.0.3a steelzorrr amxx_buy_na running
[ 28] 27 Anti DD Scroll 1.0 Empower anti_dd_scr running
[ 29] 28 CSGO Grenade Trail 1.0 Fatih ~ EjderYa grenadetrai running
[ 30] 29 RC BaseChanger freesrv AMXX rc_basechan running
[ 31] 30 Rates Checker 1.71 pRED*/Rey ratescheck. running
[ 32] 31 [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelo running
Автор плагина
styles
Версия плагина
2.5
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "Shove Mod"
#define VERSION "2.5"
#define AUTHOR "Styles"

new cShove, cCooldown, cInUse, cTeam, cOnAir
new gLastShove[32]
new shove[32]

new const TASK_ID_COOLDOWN = 9462748;
new tTemp;

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /shove", "shovePlayer")
register_clcmd("say /shoveme", "ClCmd_On")
register_clcmd("say /dontshove", "ClCmd_Off")
register_clcmd("say /dontshoveme", "ClCmd_Off")


cShove = register_cvar("shove_force", "800")
cCooldown = register_cvar("shove_cooldown", "5")
cInUse = register_cvar("shove_allow_inuse", "1")
cTeam = register_cvar("shove_team_shove", "0")
cOnAir = register_cvar("shove_on_air", "1")

register_forward(FM_PlayerPreThink, "Forward_PlayerPreThink")
}

public Forward_PlayerPreThink(id)
{
if(!get_pcvar_num(cInUse))
return PLUGIN_HANDLED
if(pev( id, pev_button ) & IN_USE && !(pev( id, pev_oldbuttons ) & IN_USE ) & !is_user_bot(id))
shovePlayer(id)

return PLUGIN_CONTINUE
}
public client_authorized(id)
{
shove[id] = true
}
public ClCmd_On(id)
{
if(shove[id])
{
c_print(id, "!gSHOVE !tShove is Already !gEnabled!n!")
return PLUGIN_HANDLED
}
else
{
shove[id]=true
c_print(id, "!gSHOVE !tYou Have Successfully !gEnabled Shove!n!")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public ClCmd_Off(id)
{
if(!shove[id])
{
c_print(id, "!gSHOVE !tShove is Already !gDisabled!n!")
return PLUGIN_HANDLED
}
else
{
shove[id]=false;
c_print(id, "!gSHOVE !tYou Have Successfully !gDisabled Shove!n!")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}

public client_disconnect(id)
{
shove[id] = false;
}
public shovePlayer(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED

if(get_systime() - gLastShove[id] < get_pcvar_num(cCooldown))
{
return PLUGIN_HANDLED
}

new Index,Body, pName[64], tName[64]
get_user_aiming(id,Index,Body,200)

if(!Index || !is_user_alive(Index))
return PLUGIN_HANDLED

new Float:size[3]
pev(id, pev_size, size)
if(size[2] < 72.0)
{
c_print(id, "!gSHOVE !tYou !gCan't Shove !tSomebody While Doing That Action!n!")
return PLUGIN_HANDLED
}

if(get_pcvar_num(cTeam) && cs_get_user_team(id) == cs_get_user_team(Index))
{
c_print(id, "!gSHOVE !tYou !gCan't Shove !tYour Own Teammate!n!")
return PLUGIN_HANDLED
}

if(get_pcvar_num(cOnAir) && !(pev(Index, pev_flags) & FL_ONGROUND))
{
c_print(id, "!gSHOVE !tYou !gCannot Shove !tSomeone on !gAir!n!")
return PLUGIN_HANDLED
}

get_user_name(id, pName, 63)
get_user_name(Index, tName, 63)
if(!shove[id]||!shove[Index])
{
if(!shove[id] && !shove[Index])
{
c_print(id, "!gSHOVE !tBoth Users Has !gDisabled Shove!n!")
return PLUGIN_HANDLED
}
else if(!shove[Index])
{
c_print(id, "!gSHOVE !tThat User Has !gDisabled Shove!n!")
return PLUGIN_HANDLED
}
else
{
c_print(id, "!gSHOVE !tSay !g/shoveme !tto !gEnable !tShove!n!")
return PLUGIN_HANDLED
}

}
new Float:velocity[3], Float:shover[3], Float:shovee[3]
pev(id, pev_origin, shover)
pev(Index, pev_origin, shovee)

for(new Count;Count < 3;Count++)
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove)
set_pev(Index, pev_velocity, velocity)
c_print(id, "!gSHOVE !tYou Just Shoved !n[!t%s!n]", tName)
c_print(Index, "!gSHOVE !tYou Have Been Shoved By !n[!t%s!n]", pName)
gLastShove[id] = get_systime()

tTemp = get_pcvar_num( cCooldown );
set_task( 1.0, "TASK_SHOW_COOLDOWN", id + TASK_ID_COOLDOWN, _, _, "b" );

return PLUGIN_HANDLED

}

public TASK_SHOW_COOLDOWN(id)
{

id -= TASK_ID_COOLDOWN;

set_hudmessage( 255, 255, 0, _, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1 );
show_hudmessage( id, "[%d]", tTemp );

tTemp--;

if( tTemp <= 0 ) {

if( task_exists( id + TASK_ID_COOLDOWN ) ) {

remove_task( id + TASK_ID_COOLDOWN );
return;
}
}

}

stock c_print(id, String[ ], any:... )
{
new szMsg[ 190 ]
vformat( szMsg, charsmax( szMsg ), String, 3 )

replace_all( szMsg, charsmax( szMsg ), "!n", "^1" )
replace_all( szMsg, charsmax( szMsg ), "!t", "^3" )
replace_all( szMsg, charsmax( szMsg ), "!g", "^4" )

static msgSayText = 0
static fake_user

if( !msgSayText )
{
msgSayText = get_user_msgid( "SayText" )
fake_user = get_maxplayers( ) + 1
}

message_begin( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgSayText, _, id )
write_byte( id ? id : fake_user )
write_string( szMsg )
message_end( )
}
I am getting these errors in logs..


L 06/27/2020 - 00:25:47: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/27/2020 - 00:25:47: [AMXX] Run time error 4: index out of bounds
L 06/27/2020 - 00:25:47: [AMXX] [0] shove_ex.sma::client_authorized (line 47)
L 06/27/2020 - 00:26:51: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/27/2020 - 00:26:51: [AMXX] Run time error 4: index out of bounds
L 06/27/2020 - 00:26:51: [AMXX] [0] shove_ex.sma::client_disconnect (line 82)


L 06/26/2020 - 17:23:37: [AMXX] [0] shove_ex.sma::client_authorized (line 47)
L 06/26/2020 - 17:23:54: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/26/2020 - 17:23:54: [AMXX] Run time error 4: index out of bounds
L 06/26/2020 - 17:23:54: [AMXX] [0] shove_ex.sma::shovePlayer (line 89)
L 06/26/2020 - 17:23:54: [AMXX] [1] shove_ex.sma::Forward_PlayerPreThink (line 41)
 
Сообщения
443
Реакции
319
Помог
13 раз(а)
11, 12 -> 33.
 
Сообщения
256
Реакции
12

After compiling I got this.. "warning 225: unreachable code" This can be ignored?


//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// shove_ex.sma
//
// D:\Amx Versions\5339\scripting\shove_ex.sma(22) : warning 217: loose indentation
// D:\Amx Versions\5339\scripting\shove_ex.sma(27) : warning 217: loose indentation
// D:\Amx Versions\5339\scripting\shove_ex.sma(62) : warning 225: unreachable code
// D:\Amx Versions\5339\scripting\shove_ex.sma(77) : warning 225: unreachable code
// D:\Amx Versions\5339\scripting\shove_ex.sma(81) : warning 233: symbol "client_disconnect" is marked as deprecated: Use client_disconnected() instead.
//
// D:\Amx Versions\5339\scripting\shove_ex.sma(122) : warning 217: loose indentation
// D:\Amx Versions\5339\scripting\shove_ex.sma(141) : warning 217: loose indentation
// D:\Amx Versions\5339\scripting\shove_ex.sma(152) : warning 217: loose indentation
// D:\Amx Versions\5339\scripting\shove_ex.sma(155) : warning 217: loose indentation
// Header size: 1060 bytes
// Code size: 6008 bytes
// Data size: 4904 bytes
// Stack/heap size: 16384 bytes
// Total requirements: 28356 bytes
//
// 9 Warnings.
// Done.
//
// Compilation Time: 0.25 sec
// ----------------------------------------

Press enter to exit ...
 
Сообщения
256
Реакции
12


L 06/27/2020 - 13:47:26: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/27/2020 - 13:47:26: [AMXX] Run time error 4: index out of bounds
L 06/27/2020 - 13:47:26: [AMXX] [0] shove_ex.sma::client_authorized (line 47)
L 06/27/2020 - 13:51:39: Player 32 is not in game.



L 06/27/2020 - 13:51:52: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/27/2020 - 13:51:52: [AMXX] Run time error 4: index out of bounds
L 06/27/2020 - 13:51:52: [AMXX] [0] shove_ex.sma::client_disconnect (line 82)



L 06/27/2020 - 13:51:53: [AMXX] Displaying debug trace (plugin "shove_ex.amxx", version "2.5")
L 06/27/2020 - 13:51:53: [AMXX] Run time error 4: index out of bounds
L 06/27/2020 - 13:51:53: [AMXX] [0] shove_ex.sma::client_authorized (line 47)
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу