WP_Hash & Crashdetect Issues (+REP)
#1

ISSUE 1: I'm pretty sure that my plugins & includes are all updated, I have a whirlpool plugin and I have nativechecker, so inside of my script of course I added:

Код:
native WP_Hash(buffer[], len, const str[]);
Even though I have those all added, when I start up my samp-server.exe and it crashes, I look into my server_log and I still manage to find this:

Код:
Error: Function not registered: 'WP_Hash'
How do I fix that? Is there a 0.3z Whirlpool plugin that I don't know about?

ISSUE 2: How do I work with the crashdetect plugin? I added it into my plugins folder and updated my server.cfg, so when I open up my server_log it shows these errors:

PHP код:
[02:52:54] [debugServer crashed while executing csrp6.amx
[02:52:54] [debugAMX backtrace:
[
02:52:54] [debug#0 native fread () [00405770] from samp-server.exe
[02:52:54] [debug#1 00012468 in ?? () from csrp6.amx
[02:52:54] [debug#2 0020f9b4 in public Audio_OnGameModeInit () from csrp6.amx
[02:52:54] [debug#3 native CallLocalFunction () [00472ad0] from samp-server.exe
[02:52:54] [debug#4 0000af4c in public SSCANF_OnGameModeInit () from csrp6.amx
[02:52:54] [debug#5 000050f4 in public Timers_OnScriptInit () from csrp6.amx
[02:52:54] [debug#6 native CallLocalFunction () [00472ad0] from samp-server.exe
[02:52:54] [debug#7 00004ee4 in public zcmd_OnGameModeInit () from csrp6.amx
[02:52:54] [debug#8 native CallLocalFunction () [00472ad0] from samp-server.exe
[02:52:54] [debug#9 00003e68 in public Itter_OnGameModeInit () from csrp6.amx
[02:52:54] [debug#10 native CallLocalFunction () [00472ad0] from samp-server.exe
[02:52:54] [debug#11 00001d10 in public YVers_OnScriptInit () from csrp6.amx
[02:52:54] [debug#12 native CallLocalFunction () [00472ad0] from samp-server.exe
[02:52:54] [debug#13 00000e98 in public OnGameModeInit () from csrp6.amx
[02:52:54] [debugNative backtrace:
[
02:52:54] [debug#0 775a22d2 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[02:52:54] [debug#1 00493990 in ?? () from samp-server.exe
[02:52:54] [debug#2 00493fc0 in ?? () from samp-server.exe
[02:52:54] [debug#3 00404f14 in ?? () from samp-server.exe 
Anybody who can help me fix these errors will receive a rep, thanks.
Reply
#2

Issue 1 looks like the plugin isn't loaded, try a different mirror.

Issue 2 is fread. It looks like the file does NOT exist.
Reply
#3

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Issue 1 looks like the plugin isn't loaded, try a different mirror.

Issue 2 is fread. It looks like the file does NOT exist.
What do you mean by a different mirror? Can you provide a link?
Also what is fread, and what am I supposed to do if it does NOT exist?
Reply
#4

Quote:
Originally Posted by Ryan McDuff
Посмотреть сообщение
What do you mean by a different mirror? Can you provide a link?
Also what is fread, and what am I supposed to do if it does NOT exist?
1. On the plugin page, you can see different plugin uploads of the version. Compiled on different machines, try different ones.

2. Check if the file is active with an if statement.

https://sampwiki.blast.hk/wiki/Fread
Reply
#5

Not sure how to work with number 2.
Reply
#6

This shows here:

Example is the file handler, change it to yours.

Код:
if(example) // If it opened successfully
Reply
#7

Change it to mine? Meaning what would I type in? I've never used this fread part before so I know nothing about it.
Reply
#8

Quote:
Originally Posted by Ryan McDuff
Посмотреть сообщение
Change it to mine? Meaning what would I type in? I've never used this fread part before so I know nothing about it.
Check what your file handler variable name is and change the example to your handler.

Read the wiki and understand it.
Reply
#9

Your thread has lack of information about your first issue. You should've posted your server log. Did Whirlpool plugin fail to load? Do you have Whirlpool plugin loaded AFTER nativechecker? All those questions would have been answered by simply reading your server log (the part that loads the plugins).

About the second issue, KyleSmith already direct you to Wiki which explains it perfect. Beforing using fread/fwrite/fclose, you MUST check if the file handle (whether the file opened successful or not) is valid before using the variable that stores the file ID on those.
So if you do:
pawn Код:
new File: file = fopen(...);
you should have below it:
pawn Код:
new File: file = fopen(...);
if (file)
{
    // Use fread, fwrite, fclose inside here to prevent crashes.
}
Use debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
in order to get the lined caused the crash so you can fix it with the above way.
Reply
#10

When I use crashdetect how do I compile my gamemode in debug mode, I open the pawno folder and right click and create a new file.. As in a file I create a new folder or text document or what? Also the next step is to enter a code, not sure how to properly enter it into the text document.
I need a specific step-by-step procedure how to use crashdetect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)