Server crashed due to an unknown error
#1

Hey !

I tried to code a plugin today, using Kyosaur's tut and Zeex's sampgdk plugin.

Though, when I start the server, it crashes. Then, I decided to load crashdetect to locate the crash source, and it displays me this :

Код:
[22:21:59]   Loading filterscript 'test_fs.amx'... // the filterscript where I test the natives I added
[22:22:00] [debug] Server crashed due to an unknown error
[22:22:00] [debug] Native backtrace:
[22:22:00] [debug] #0 0f2e1b92 in AmxLoad () from plugins\plugin.dll
[22:22:00] [debug] #1 00469205 in ?? () from samp-server.exe
The strange thing here is that my AmxLoad function contains nothing unusual :

PHP код:

AMX_NATIVE_LIST natives
[] =
{
      {
"IsVirtualKeyPressed"IsVirtualKeyPressed_},
      
// more natives
      
NULLNULL }
};
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx)
{
    return 
amx_Register(amxnatives, -1);

It compiled with no errors in Visual Studio 2013.

Full code here : http://pastebin.com/79qEH8id
Reply
#2

show us the full code or at least some parts that can be useful to fix the issue
Reply
#3

The fact is that I don't know how the issue happens - and thus can't show you specific parts of my code.

If you want the full code, here it is : http://pastebin.com/79qEH8id
Reply
#4

Interesting, beucase for me it helped a lot already. Even if plugin compiled with debug info..
Reply
#5

Like everybody
Reply
#6

Did you initialize pAMXFunctions? All AMX functions are called through this variable (see amxplugin.cpp).
Reply
#7

Yea Zeex is right, you should add "extern void *pAMXFunctions;" above the player data structure.
Reply
#8

I did not initialize it. And this was the problem. Thanks @Zeex !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)