Senior Member
|
09-05-2015
, 07:34
Problem with natives, server crash
|
#1
|
Steps to reproduce the crash:
1st way:
- With only natives.amxx
- Start the server
- type restart or changelevel map
- Server will crash
-
2nd way:
- With natives.amxx and nativesCall.amxx
- Start the server
-
native.sma
PHP Code:
#include <amxmodx>
native testCrash(p1 = 0, p2[] = "", p3[] = "", p4[] = "", p5[] = "", p6[] = "", p7 = 0, Float: p8 = 0.0, Float: p9 = 0.0, Float: p10 = 0.0, Float: p11 = 0.0, p12 = 0, p13 = 0, p14 = 0, p15 = 0, p16 = 0);
public plugin_precache()
{
log_to_file("native.log", "[native] plugin_precache pre");
/* Call the native */
testCrash(1, "param 2", "param 3", "param 4", "param 5", "param 6", 0, 80.0, 90.0, 100.0, 110.0, 12, 13, 14, 15, 16);
log_to_file("native.log", "[native] plugin_precache post");
}
public plugin_init()
{
log_to_file("native.log", "[native] plugin_init");
register_plugin("native crash", "1", "asd");
}
public plugin_natives()
{
log_to_file("native.log", "[native] plugin_natives");
register_native("testCrash", "nativeTestCrash");
}
public nativeTestCrash( iPluginID, iParams )
{
log_to_file("native.log", "------------------------------");
log_to_file("native.log", "iPluginID: %d - iParams: %d", iPluginID, iParams);
for (new iIndex = 1; iIndex <= iParams; iIndex++)
{
switch (iIndex)
{
case 2..6:
{
new szParam[112];
get_string(iIndex, szParam, charsmax(szParam));
log_to_file("native.log", " - Param (%d): %s", iIndex, szParam);
}
case 8..11:
{
log_to_file("native.log", " - Param (%d): %.02f", iIndex, get_param_f(iIndex));
}
default:
{
log_to_file("native.log", " - Param (%d): %d", iIndex, get_param(iIndex));
}
}
}
log_to_file("native.log", "------------------------------");
}
nativeCall.sma
PHP Code:
#include <amxmodx>
native testCrash(p1 = 0, p2[] = "", p3[] = "", p4[] = "", p5[] = "", p6[] = "", p7 = 0, Float: p8 = 0.0, Float: p9 = 0.0, Float: p10 = 0.0, Float: p11 = 0.0, p12 = 0, p13 = 0, p14 = 0, p15 = 0, p16 = 0);
public plugin_precache()
{
log_to_file("native.log", "[nativeCall] plugin_precache pre");
testCrash(1, "param 2", "param 3", "param 4", "param 5", "param 6", 0, 80.0, 90.0, 100.0, 110.0, 12, 13, 14, 15, 16);
log_to_file("native.log", "[nativeCall] plugin_precache post");
}
meta version:
PHP Code:
Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:14 EET (optimized)
meta list:
PHP Code:
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.8.3-d ini Start ANY
1 plugins, 1 running
HLDS version:
PHP Code:
Protocol version 48
Exe version 1.1.2.7 (cstrike)
Exe build: 13:13:29 Aug 29 2013 (6153)
AMXX Version: 1.8.3-dev+4880
|
|