Crashdetec AMX_PATH -
AroseKhanNiazi - 05.01.2017
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>
Re: Crashdetec AMX_PATH -
Spmn - 05.01.2017
https://www.cyberciti.biz/faq/set-en...ariable-linux/
http://superuser.com/questions/79612...command-prompt
Re: Crashdetec AMX_PATH -
AroseKhanNiazi - 05.01.2017
A example would help here, that link kind confused me more.
Re: Crashdetec AMX_PATH -
AroseKhanNiazi - 06.01.2017
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>
Re: Crashdetec AMX_PATH -
Spmn - 06.01.2017
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:
Linux:
1. Go to samp server folder and open a shell there
2. Type:
Код:
export AMX_PATH=path/to/amx
3. Type:
Re: Crashdetec AMX_PATH -
AroseKhanNiazi - 07.01.2017
But according to the one zeex said we need to do something in server.cfg
Re: Crashdetec AMX_PATH -
Spmn - 07.01.2017
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.