round_end.amxx

Тема заброшена: В данной теме не было ответов более 60 дней.
За это время некоторые ее участники могли уйти с форума, состариться и умереть.
Аватара пользователя

Автор Темы
dityatko
Сообщения: 142
Зарегистрирован: 09 окт 2021, 12:11
Репутация: 2
Благодарил (а): 6 раз
Статус: Не в сети

round_end.amxx

Сообщение dityatko »

Код: Выделить всё

-L 04/03/2023 - 00:30:31: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:30:31: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:31:10: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:31:10: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:31:56: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:31:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:32:51: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:32:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:33:29: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:33:29: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:34:23: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:34:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:35:04: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:35:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:35:32: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:35:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:36:29: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:36:29: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 00:36:47: Start of error session.
L 04/03/2023 - 00:36:47: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20230403.log")
L 04/03/2023 - 00:36:47: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 00:36:47: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:05:29: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:05:29: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:06:05: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:06:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:07:11: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:07:11: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:08:23: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:08:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:09:16: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:09:16: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:10:15: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:10:15: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:11:04: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:11:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:11:33: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:11:33: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:12:19: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:12:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:13:32: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
L 04/03/2023 - 01:13:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 04/03/2023 - 01:13:58: [AMXX] Run time error 4 (plugin "round_end.amxx") - debug not enabled!
Linux

Код: Выделить всё

AMX Mod X 1.9.0.5263

Код: Выделить всё

Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.779-dev
Build date: 17:33:11 Aug 24 2022 (3056)

Код: Выделить всё

ReGameDLL version: 5.21.0.540-dev

Код: Выделить всё

Metamod-r v1.3.0.128, API (5:13)

Код: Выделить всё

[ 1] VoiceTranscoder  RUN   -    VoiceTranscoder.so          v2017RC5         ini  ANY   ANY  
 [ 2] Reunion          RUN   -    reunion_mm_i386.so          v0.1.0.92c       ini  Start Never
 [ 3] Rechecker        RUN   -    rechecker_mm_i386.so        v2.5             ini  Chlvl ANY  
 [ 4] AMX Mod X        RUN   -    amxmodx_mm_i386.so          v1.9.0.5263      ini  Start ANY  
 [ 5] ReSemiclip       RUN   -    resemiclip_mm_i386.so       v2.3.9           ini  Chlvl ANY  
 [ 6] WHBlocker        RUN   -    whblocker_mm_i386.so        v1.5.697         ini  Chlvl ANY  
 [ 7] ReSRDetector     RUN   -    resrdetector_mm_i386.so     v0.1.0           ini  Chlvl ANY  
 [ 8] ReAuthCheck      RUN   -    reauthcheck_mm_i386.so      v0.1.6           ini  Start Never
 [ 9] HitBox Fix       RUN   -    hitbox_fix_mm_i386.so       v1.0.11          ini  Start ANY  
 [10] MySQL            RUN   -    mysql_amxx_i386.so          v1.9.0.5263      pl4  ANY   ANY  
 [11] SQLite           RUN   -    sqlite_amxx_i386.so         v1.9.0.5263      pl4  ANY   ANY  
 [12] Fun              RUN   -    fun_amxx_i386.so            v1.9.0.5263      pl4  ANY   ANY  
 [13] Engine           RUN   -    engine_amxx_i386.so         v1.9.0.5263      pl4  ANY   ANY  
 [14] FakeMeta         RUN   -    fakemeta_amxx_i386.so       v1.9.0.5263      pl4  ANY   ANY  
 [15] GeoIP            RUN   -    geoip_amxx_i386.so          v1.9.0.5263      pl4  ANY   ANY  
 [16] CStrike          RUN   -    cstrike_amxx_i386.so        v1.9.0.5263      pl4  ANY   ANY  
 [17] CSX              RUN   -    csx_amxx_i386.so            v1.9.0.5263      pl4  ANY   ANY  
 [18] Ham Sandwich     RUN   -    hamsandwich_amxx_i386.so    v1.9.0.5263      pl4  ANY   ANY  
 [19] ReAimDetector    RUN   -    reaimdetector_amxx_i386.so  v0.2.2           pl4  ANY   Never
 [20] SxGeo            RUN   -    sxgeo_amxx_i386.so          v2.2             pl4  ANY   Never
 [21] ReAPI            RUN   -    reapi_amxx_i386.so          v5.21.0.248-dev  pl4  ANY   Never
 [22] CURL AMXX        RUN   -    curl_amxx_i386.so           v1.1.1           pl4  ANY   ANY  
22 plugins, 22 running

Код: Выделить всё

[  1] [190] AMXBans RBS       22.12.08BE  SKAJIbnEJIb & La  amxbans_rbs.amx  running  
 [  2] [190] Cvar On Map       20.06.06    SKAJIbnEJIb       cvar_on_map.amx  running  
 [  3] [ReAPI] Healthnade      0.0.2       F@nt0M            reapi_healthnad  running  
 [  4] [190] Snipers RBS       20.06.06    SKAJIbnEJIb       snipers_rbs.amx  running  
 [  5] Advanced Kill Assists   1.3c        Xelson            next21_kill_ass  running  
 [  6] [190] MapsMenu RBS      20.06.06    SKAJIbnEJIb & AM  mapsmenu_rbs.am  running  
 [  7] Menus Front-End         20.06.06    SKAJIbnEJIb & AM  amxmodmenu_rbs.  running  
 [  8] [190] Ultimate Gag      21.01.02BE  SKAJIbnEJIb       ultimate_gag.am  running  
 [  9] [ReAPI][183] Ultimate   18.12.22    SKAJIbnEJIb       ultimate_gag_re  running  
 [ 10] [190] AdminCmd RBS      22.11.15    SKAJIbnEJIb & AM  admincmd_rbs.am  running  
 [ 11] [190] MapChooser RBS    20.08.02    SKAJIbnEJIb & UF  mapchooser_rbs.  running  
 [ 12] [190] TimeLeft          18.09.25    SKAJIbnEJIb & AM  timeleft.amxx    running  
 [ 13] Dop_gungame             1.0         host-v.ru         dop_gungame.amx  running  
 [ 14] Hobo Crontab            1.1         hoboman313        hobo_crontab.am  running  
 [ 15] Commands Menu           1.9.0.5263  AMXX Dev Team     cmdmenu.amxx     running  
 [ 16] Plugin Menu             1.9.0.5263  AMXX Dev Team     pluginmenu.amxx  running  
 [ 17] Revive/Mined Die Playe  2.3.9       Emma Jule         revive_teammate  running  
 [ 18] [190] Skill ELO         22.11.15    SKAJIbnEJIb       skill_elo.amxx   running  
 [ 19] [190] Ultimate Flags    22.11.15    SKAJIbnEJIb       ultimate_flags.  running  
 [ 20] [190] BonusMenu RBS     22.12.07BE  SKAJIbnEJIb       bonusmenu_rbs.a  running  
 [ 21] ReAimDetector API       0.2.2       ReHLDS Team       reaimdetector.a  running  
 [ 22] Permanent message       1.1         He3aBuCuM         permanent_messa  running  
 [ 23] [190] Ultimate Weapons  22.11.15    SKAJIbnEJIb       ultimate_weapon  running  
 [ 24] [190] Screen Player     22.12.07BE  SKAJIbnEJIb       screen_player.a  running  
 [ 25] [190] No Team Flash     20.06.06    SKAJIbnEJIb       NoTeamFlash.amx  running  
 [ 26] [190] Ultimate Models   22.12.08BE  SKAJIbnEJIb       ultimate_models  running  
 [ 27] [190] AfkKicker RBS     22.11.15    SKAJIbnEJIb       afkkicker_rbs.a  running  
 [ 28] [190] Army Ranks Ultim  20.06.06    SKAJIbnEJIb       army_ranks_ulti  running  
 [ 29] [190] Chat RBS          20.10.24BE  SKAJIbnEJIb       chat_rbs.amxx    running  
 [ 30] [190] StatsX Unlimited  22.12.08    SKAJIbnEJIb       statsx_unlimite  running  
 [ 31] [190] CsStats MySQL     22.11.15    SKAJIbnEJIb       csstats_mysql.a  running  
 [ 32] [190] Damager RBS       20.06.06    SKAJIbnEJIb       damager_rbs.amx  running  
 [ 33] [190] Stats Configurat  20.06.06    SKAJIbnEJIb & AM  statscfg_rbs.am  running  
 [ 34] [190] StatsX RBS        21.03.23    SKAJIbnEJIb & AM  statsx_rbs.amxx  running  
 [ 35] [190] VIP RBS           22.12.08BE  SKAJIbnEJIb       vip_rbs.amxx     running  
 [ 36] [190] Stimulation RBS   22.12.08BE  SKAJIbnEJIb       stimulation_rbs  running  
 [ 37] [190] Ultimate Knife    20.06.06    SKAJIbnEJIb       ultimate_knife.  running  
 [ 38] [190] Night DeathMatch  21.03.23    SKAJIbnEJIb & Sh  night_dm.amxx    running  
 [ 39] [190] Warmup RBS        21.03.23    SKAJIbnEJIb       warmup_rbs.amxx  running  
 [ 40] [190] VoteBan RBS       20.06.06    SKAJIbnEJIb       voteban_rbs.amx  running  
 [ 41] Silly C4                1.1         Cheap_Suit        sillyc4.amxx     running  
 [ 42] [190] High Ping Kicker  20.06.06    SKAJIbnEJIb       hpk_rbs.amxx     running  
 [ 43] [190] Parachute RBS     20.08.22BE  SKAJIbnEJIb & KR  parachute_rbs.a  running  
 [ 44] Bomb  Timer             3.2         Twe3k             plent_bomb.amxx  running  
 [ 45] [190] SlayLosers RBS    20.06.06    SKAJIbnEJIb & d3  slaylosers_rbs.  running  
 [ 46] [190] Map Spawns Edito  20.06.06    SKAJIbnEJIb & iG  MapSpawnsEditor  running  
 [ 47] [190] DemoRecorder RBS  20.06.06    SKAJIbnEJIb       demorecorder_rb  running  
 [ 48] [190] AR Vampire        20.06.06    SKAJIbnEJIb       ar_vampire.amxx  running  
 [ 49] Reset Score             1.0         M1 TEAM           ResetScore.amxx  running  
 [ 50] [190] AC Spectator ESP  20.06.06    SKAJIbnEJIb & Ko  ac_esp.amxx      running  
 [ 51] Autoresponder/Advertis  0.5         MaximusBrood      ad_manager.amxx  running  
 [ 52] No Name Change          0.1.1       VEN               no_name_change.  running  
 [ 53] [190] Anti Kill Hostag  20.06.06    SKAJIbnEJIb & .F  anti_kill_hosta  stopped  
 [ 54] [190] C4 Destroyer      22.12.07BE  SKAJIbnEJIb       c4_destroyer.am  running  
 [ 55] Last players sound      1.0         dev-cs community  last_players_so  running  
 [ 56] Grenade Throw Multipli  0.4.0       F@nt0M            grenade_throw_m  running  
 [ 57] Round End               1.0         OverGame          round_end.amxx   running  
 [ 58] CSO Kill Sounds         1.0.7       Radius (based on  cso_kill_sounds  running  
 [ 59] Auto Team Balance Adva  1.5.1       Radius            auto_team_balan  running  
 [ 60] Ultimate Gore           1.6         JTP10181          amx_gore_ultima  running  
 [ 61] Custom Smoke            1.07        bionext           custom_smoke.am  running  
 [ 62] [190] Transfer RBS      22.12.08BE  SKAJIbnEJIb       transfer_rbs.am  running  
 [ 63] [190] RestMenu RBS      20.06.06    SKAJIbnEJIb & AM  restmenu_rbs.am  running  
 [ 64] Block grande info       1.0         neygomon          BlockGrenadeInf  running  
 [ 65] Block grande info       1.0         neygomon          BlockGrenadeInf  running  
 [ 66] Injection Med-Kit       1.1.3       Emma Jule         injection.amxx   running  
 [ 67] [190] MOTD RBS          22.12.08BE  SKAJIbnEJIb       motd_rbs.amxx    running  
 [ 68] Land Mine               1.0         6u3oH             reapi_land_mine  debug    
 [ 69] Presents: API           1.1         mx?!              presents_api.am  running  
 [ 70] Presents From Corpses   1.1         mx?!              presents_from_c  debug    
 [ 71] Presents: Info & Effec  1.2         mx?!              presents_info_e  debug    
 [ 72] Presents: Money         1.1         mx?!              presents_money.  debug    
 [ 73] Presents: AES EXP       1.1         mx?!              presents_aes_ex  debug    
 [ 74] Presents: AES ANEW      1.1         mx?!              presents_aes_an  debug    
 [ 75] Presents: Health        1.1         mx?!              presents_health  debug    
 [ 76] Presents: Armor         1.1         mx?!              presents_armor.  debug    
 [ 77] Presents: Grenades      1.1         mx?!              presents_grenad  debug    
 [ 78] Presents: Footsteps     1.1         mx?!              presents_footst  debug    
 [ 79] Presents: Regeneration  1.1         mx?!              presents_regene  debug    
 [ 80] Presents: Ammo Regener  1.1         mx?!              presents_ammo_r  debug    
 [ 81] Presents: Speed         1.2         mx?!              presents_speed.  debug    
 [ 82] Presents: Protection    1.1         mx?!              presents_protec  debug    
 [ 83] Presents: Damage        1.1         mx?!              presents_damage  debug    
 [ 84] Presents: Fastreloadin  1.1         mx?!              presents_fastre  debug    
 [ 85] Presents: Gravity       1.1         mx?!              presents_gravit  debug    
 [ 86] Presents: MultiJump     1.1         mx?!              presents_multij  debug    
 [ 87] Presents: Grenade Prot  1.1         mx?!              presents_grenad  debug    
87 plugins, 86 running
OverGame
1.0

Код: Выделить всё

#include < amxmodx >
#include < amxmisc >

new szSound [ 32 + 1 ][ 63 + 1 ],
	Sound [ 33 ], lens, r_num = 0

public plugin_init ( )
{
	register_plugin ( "Round End", "1.0", "OverGame" )
	
	register_cvar ( "re_info", "1" )
	register_cvar ( "re_start_off", "0" )
	
	register_logevent ( "logevent_round_start", 2, "1=Round_Start" )
	register_logevent ( "logevent_round_end", 2, "1=Round_End" )
	
	register_clcmd ( "say /sound", "volume_control" )
	register_clcmd ( "say_team /sound", "volume_control" )
	
	set_task ( 300.0, "control_info", _, _, _, "b" )
	register_dictionary ( "round_end.txt" )
}

public plugin_precache ( )
{
	read_ini ( )
	
	new i
	for ( i = 1; i <= lens; i++ )
		precache_sound ( szSound [ i ] )
}

public plugin_cfg ( )
{
	new szCfgDir [ 64 ], szFile [ 192 ]
	get_configsdir ( szCfgDir, charsmax ( szCfgDir ) )
	format ( szFile, charsmax ( szFile ), "%s/round_end.cfg", szCfgDir )
	
	if ( file_exists ( szFile ) )
		server_cmd ( "exec %s", szFile )
}

public read_ini ( )
{
	new len = 1, buffer [ 256 ]
	new file = fopen ( "/addons/amxmodx/configs/round_end.ini", "r" )
	
	while ( !feof ( file ) )
	{
		fgets ( file, buffer, 255 )
		trim ( buffer )
		
		if ( buffer [ 0 ] == '"' )
		{
			parse ( buffer, szSound [ len ], 63 )
		} else {
			continue
		}
		len++
	}
	
	lens = len - 1
	fclose ( file )
}

public logevent_round_start ( )
{
	for ( new id = 1; id <= get_maxplayers (); id++ )
	{
		if ( get_cvar_num ( "re_start_off" ) ) 
			client_cmd ( id, "mp3 stop" )
	}
	
	return PLUGIN_CONTINUE
}

public logevent_round_end ( )
{
	if ( r_num == lens )
		r_num = 0
	
	r_num++

	for ( new id = 1; id <= get_maxplayers (); id++ )
	{
		if ( is_user_connected ( id ) && Sound [ id ] )
			client_cmd ( id, "mp3 play sound/%s", szSound [ r_num ] )
	}
	
	return PLUGIN_CONTINUE
}

public client_putinserver ( id )
	Sound [ id ] = true

public control_info ( )
{
	for ( new id = 1; id <= get_maxplayers (); id++ )
	{
		if ( is_user_connected ( id ) && get_cvar_num ( "re_info" ) )
		{
			ShowMsg ( id, "%L %L", LANG_SERVER, "RE_PREFIX", LANG_SERVER, "RE_INFO" )
		}
	}
	
	return PLUGIN_CONTINUE
}
	
public volume_control ( id )
{
	if ( Sound [ id ] )
	{
		Sound [ id ] = false
		ShowMsg ( id, "%L %L", LANG_SERVER, "RE_PREFIX", LANG_SERVER, "RE_OFF" )
	} else {
		Sound [ id ] = true
		ShowMsg ( id, "%L %L", LANG_SERVER, "RE_PREFIX", LANG_SERVER, "RE_ON" )
	}
	
	return PLUGIN_HANDLED
}

stock ShowMsg ( const id, const input [ ], any:... )
{
	new count = 1, players [ 32 ]
	static msg [ 188 ]
	vformat ( msg, 187, input, 3 )
	
	replace_all ( msg, 187, "!g", "^4" )
	replace_all ( msg, 187, "!y", "^1" )
	replace_all ( msg, 187, "!t", "^3" )
	
	if ( id ) players [ 0 ] = id; else get_players ( players, count, "ch" )
	{
		for ( new i = 0; i < count; i++ )
		{
			if ( is_user_connected ( players [ i ] ) )
			{
				message_begin ( MSG_ONE_UNRELIABLE, get_user_msgid ( "SayText" ), _, players [ i ] )
				write_byte ( players [ i ] )
				write_string ( msg )
				message_end ( )
			}
		}
	}
}
Нет воспроизведения музыки в конце раунда.Файлы с mp3 залиты в папку sound.Сам плагин -running.


Аватара пользователя

Host-v
Администратор
Сообщения: 120
Зарегистрирован: 04 окт 2020, 14:08
Репутация: 4
Откуда: Красноярск
Благодарил (а): 2 раза
Поблагодарили: 9 раз
Статус: Не в сети

round_end.amxx

Сообщение Host-v »

dityatko, в plugins.ini после round_end.amxx добавь debug
Чтобы получилось round_end.amxx debug

Смените карту или перезагрузите сервер. После этого ошибки в логах будут более подробные вот то что будет в логах отправте сюда
Хостинг игровых серверов host-v.ru
Аватара пользователя

Автор Темы
dityatko
Сообщения: 142
Зарегистрирован: 09 окт 2021, 12:11
Репутация: 2
Благодарил (а): 6 раз
Статус: Не в сети

round_end.amxx

Сообщение dityatko »

L 04/03/2023 - 12:30:44: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20230403.log")
L 04/03/2023 - 12:30:44: [AMXX] Displaying debug trace (plugin "round_end.amxx", version "unknown")
L 04/03/2023 - 12:30:44: [AMXX] Run time error 4: index out of bounds
L 04/03/2023 - 12:30:44: [AMXX] [0] round_end.sma::read_ini (line 55)
L 04/03/2023 - 12:30:44: [AMXX] [1] round_end.sma::plugin_precache (line 26)
Аватара пользователя

bizon
Скриптер
Сообщения: 1
Зарегистрирован: 10 фев 2023, 15:43
Репутация: 2
Поблагодарили: 2 раза
Статус: Не в сети

round_end.amxx

Сообщение bizon »

Выход за пределы массива szSound.

Решения:
1. Увеличить размер массива.
  1. new szSound [ 32 + 1 ][ 63 + 1 ]
заменить на:
  1. new szSound [ 64 ][ MAX_RESOURCE_PATH_LENGTH ]

2. Добавить проверку, чтобы при чтении файла за размер массива не было выхода. В начало тела цикла добавить:
  1. if(len >= charsmax(szSound))
  2.     break;

3. Самый адекватный вариант – использовать динамический массив Array.
Аватара пользователя

Автор Темы
dityatko
Сообщения: 142
Зарегистрирован: 09 окт 2021, 12:11
Репутация: 2
Благодарил (а): 6 раз
Статус: Не в сети

round_end.amxx

Сообщение dityatko »

bizon писал(а): Выход за пределы массива szSound.

Решения:
1. Увеличить размер массива.
  1. new szSound [ 32 + 1 ][ 63 + 1 ]
заменить на:
  1. new szSound [ 64 ][ MAX_RESOURCE_PATH_LENGTH ]

2. Добавить проверку, чтобы при чтении файла за размер массива не было выхода. В начало тела цикла добавить:
  1. if(len >= charsmax(szSound))
  2.     break;

3. Самый адекватный вариант – использовать динамический массив Array.
Спасибо большое,сейчас исправим.
Аватара пользователя

Host-v
Администратор
Сообщения: 120
Зарегистрирован: 04 окт 2020, 14:08
Репутация: 4
Откуда: Красноярск
Благодарил (а): 2 раза
Поблагодарили: 9 раз
Статус: Не в сети

round_end.amxx

Сообщение Host-v »

dityatko, спасибо можно сказать пальцем в верх
IMG_2302.jpeg
Или кинул на баланс один рублик и то будет приятно))
IMG_2304.jpeg
Хостинг игровых серверов host-v.ru
Аватара пользователя

Автор Темы
dityatko
Сообщения: 142
Зарегистрирован: 09 окт 2021, 12:11
Репутация: 2
Благодарил (а): 6 раз
Статус: Не в сети

round_end.amxx

Сообщение dityatko »

Host-v писал(а): dityatko, спасибо можно сказать пальцем в верх IMG_2302.jpeg
Или кинул на баланс один рублик и то будет приятно))
IMG_2304.jpeg
У меня только вот так выходит)
image.png

Отправлено спустя 3 минуты 22 секунды:

А,всё понял,на денежку надо было)
Адрес email:
Ответить Пред. темаСлед. тема