Crashdetec AMX_PATH
#1

I have my scripts in following order

filterscripts-> (Scripts) These are debugged fine.
filterscripts/Missions ->(Scripts) these scripts just give me error but it's always <unknown>

So I can't either be sure it's due to that script or what.

All the scripts have crashdetect loaded as first include.
crashdetect is the first plugin.

-d3 compiler mode.

https://github.com/Zeex/samp-plugin-...%28AMX_PATH%29

I found this function, but can't seem to understand how do I use it.

Update:
Update tried these no use:
Код:
AXM_PATH filterscripts/Test/ : ../filterscripts/Test/
Код:
AXM_PATH filterscripts/Test/
Код:
AXM_PATH ../filterscripts/Test/
Код:
AXM_PATH filterscripts/Test/Error
Код:
AXM_PATH filterscripts/Test/Error.amx
These were last lines of server.cfg

The test script I used was
Код:
#include <a_samp>
#include <crashdetect>

public OnFilterScriptInit()
{
	for(new J=0; J < 5; J++)
	{
		back:
		new skin=random(312);
		if(skin == 74 || skin < 1) goto back;
		AddPlayerClassEx(J,J,0.0,0.0,5.0,0.0,0,24,50,0,0,0);
	}	
	return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
	new array[1];
	array[0+classid]=-1;
	printf("%d",array[classid]);
	return 1;
}
I know this will cause error as this is a script I am trying on purpose.

Errors I get
[11:47:44] [debug] Attempted to read/write array element at index 3 in array of size 1
[11:47:44] [debug] AMX backtrace:
[11:47:44] [debug] #0 00000230 in public OnPlayerRequestClass (0, 3) from <unknown>
Reply
#2

https://www.cyberciti.biz/faq/set-en...ariable-linux/
http://superuser.com/questions/79612...command-prompt
Reply
#3

A example would help here, that link kind confused me more.
Reply
#4

Update tried these no use:
Код:
AXM_PATH filterscripts/Test/ : ../filterscripts/Test/
Код:
AXM_PATH filterscripts/Test/
Код:
AXM_PATH ../filterscripts/Test/
Код:
AXM_PATH filterscripts/Test/Error
Код:
AXM_PATH filterscripts/Test/Error.amx
These were last lines of server.cfg

The test script I used was
Код:
#include <a_samp>
#include <crashdetect>

public OnFilterScriptInit()
{
	for(new J=0; J < 5; J++)
	{
		back:
		new skin=random(312);
		if(skin == 74 || skin < 1) goto back;
		AddPlayerClassEx(J,J,0.0,0.0,5.0,0.0,0,24,50,0,0,0);
	}	
	return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
	new array[1];
	array[0+classid]=-1;
	printf("%d",array[classid]);
	return 1;
}
I know this will cause error as this is a script I am trying on purpose.

Errors I get
[11:47:44] [debug] Attempted to read/write array element at index 3 in array of size 1
[11:47:44] [debug] AMX backtrace:
[11:47:44] [debug] #0 00000230 in public OnPlayerRequestClass (0, 3) from <unknown>
Reply
#5

Windows:
1. Go to samp server folder and open a command prompt window (press shift+right click)
2. Type:
Код:
set AMX_PATH=path\to\amx
3. Type:
Код:
samp-server
Linux:
1. Go to samp server folder and open a shell there
2. Type:
Код:
export AMX_PATH=path/to/amx
3. Type:
Код:
./samp03svr
Reply
#6

But according to the one zeex said we need to do something in server.cfg
Reply
#7

No, he says that if AMX files are not located in the default directories (filterscripts, gamemodes), then you must point crashdetect to those directories by adding them to AMX_PATH, otherwise crashdetect won't be able to run properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)