Raised This Month: $51 Target: $400
 12% 

csdm_reload limits the length of its argument


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RealNC
Junior Member
Join Date: Feb 2008
Old 03-03-2008 , 23:35   csdm_reload limits the length of its argument
Reply With Quote #1

When I try to:

Code:
csdm_reload csdm\extraconfigs\item-mode_random-spawns.cfg
I get this error:

Code:
Could not read config file: cstrike/addons/amxmodx/configs/csdm/extraconfigs/item-mode_rand
That means if the path is longer than 63 characters, it won't work.
__________________

Last edited by RealNC; 03-05-2008 at 17:44.
RealNC is offline
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 03-04-2008 , 03:31   Re: csdm_reload limits the length of its argument
Reply With Quote #2

In the csdm_main.sm,a find the function csdm_reload and replac it by this one:
Code:
public csdm_reload(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
		
	new file[128] = ""
	if (read_argc() >= 2)
	{
		read_argv(1, file, 127)
	}
		
	if (csdm_reload_cfg(file))
	{
		client_print(id, print_chat, "[CSDM] Config file reloaded.")
	} else {
		client_print(id, print_chat, "[CSDM] Unable to find config file.")
	}
		
	return PLUGIN_HANDLED
}
I mean "64" replace by "128" and "63" replace by "127". Then compile the plugin and copy compiled plugin from amxmodx/scripting/compiled to amxmodx/pluginx .
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
RealNC
Junior Member
Join Date: Feb 2008
Old 03-04-2008 , 15:13   Re: csdm_reload limits the length of its argument
Reply With Quote #3

Thanks for the tip. Hope the next version will have it increased by default, since names like "item-mode_preset-spawn_no-awp.cfg" help to manage my configs
__________________

Last edited by RealNC; 03-05-2008 at 17:44.
RealNC is offline
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 03-05-2008 , 03:02   Re: csdm_reload limits the length of its argument
Reply With Quote #4

It was increased already from 32 (CSDM 2.1) to 64 (CSDM2.1.1), because it was reported earlier as a bug. In my beta is 128. I don't know why Bailopan wanted to save these 64 bytes just here.
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode