SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/10/2016, 09:52 AM   #1
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,046
Reputation: 48
Default Console error

Code:
samp03svr: amx/amxfile.c:101: fgets_cell: Assertion `fp!=((void *)0)' failed.
[debug] Server crashed while executing rg3.amx
[debug] AMX backtrace:
[debug] #0 native fread () from samp03svr
[debug] #1 0002b6e8 in ?? () from rg3.amx
[debug] #2 0002baa0 in public L_AFK_OnGM () from rg3.amx
[debug] #3 native CallLocalFunction () from samp03svr
[debug] #4 0001ef00 in public Itter_OnGameModeInit () from rg3.amx
[debug] #5 native CallLocalFunction () from samp03svr
[debug] #6 0001c8f0 in public SSCANF_OnGameModeInit () from rg3.amx
[debug] #7 00016a18 in ?? () from rg3.amx
[debug] #8 00007120 in public ScriptInit_OnGameModeInit () from rg3.amx
[debug] #9 00002fb0 in public OnGameModeInit () from rg3.amx
[debug] Native backtrace:
[debug] #0 f668ee8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[debug] #1 f6687bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[debug] #2 f6688dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[debug] #3 f6689226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[debug] #4 f668eadc in ?? () from plugins/crashdetect.so
[debug] #5 f7796410 in ?? ()
[debug] #6 f7796430 in ?? ()
[debug] #7 f749f607 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[debug] #8 f74a2a33 in abort () from /lib/i386-linux-gnu/libc.so.6
[debug] #9 f7498757 in ?? () from /lib/i386-linux-gnu/libc.so.6
[debug] #10 f7498807 in ?? () from /lib/i386-linux-gnu/libc.so.6
[debug] #11 0809b7a1 in ?? () from ./samp03svr
[debug] #12 0809bf43 in ?? () from ./samp03svr
[debug] #13 080950e4 in ?? () from ./samp03svr
[debug] #14 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #15 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #16 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #17 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #18 f668d659 in ?? () from plugins/crashdetect.so
[debug] #19 f626a27c in ?? () from plugins/streamer.so
[debug] #20 080dfd62 in ?? () from ./samp03svr
[debug] #21 080950e4 in ?? () from ./samp03svr
[debug] #22 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #23 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #24 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #25 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #26 f668d659 in ?? () from plugins/crashdetect.so
[debug] #27 f626a27c in ?? () from plugins/streamer.so
[debug] #28 080dfd62 in ?? () from ./samp03svr
[debug] #29 080950e4 in ?? () from ./samp03svr
[debug] #30 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #31 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #32 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #33 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #34 f668d659 in ?? () from plugins/crashdetect.so
[debug] #35 f626a27c in ?? () from plugins/streamer.so
[debug] #36 080a503b in ?? () from ./samp03svr
[debug] #37 080ab922 in ?? () from ./samp03svr
[debug] #38 080aa0fd in ?? () from ./samp03svr
[debug] #39 f748aa83 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6

Why?
AndreiWow is offline   Reply With Quote
Old 02/10/2016, 09:54 AM   #2
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: Console error

Read the warning box and take a look at the example (specifically after the comment "Check, if the file is opened"): http://wiki.sa-mp.com/wiki/Fread
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 02/10/2016, 10:02 AM   #3
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,046
Reputation: 48
Default Re: Console error

But it worked before

fread(fhConnectionInfo, szQueryOutput);
fclose(fhConnectionInfo);
AndreiWow is offline   Reply With Quote
Old 02/10/2016, 10:04 AM   #4
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: Console error

It did because it always opened the file successfully. When fopen returns 0 though it will crash the server.
Plus make sure scriptfiles is both readable and writable (permissions).
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 02/10/2016, 10:05 AM   #5
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,046
Reputation: 48
Default Re: Console error

Woops it was my fault for placing the folder in the wrong place xD
AndreiWow is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Console Error TheSnaKe Scripting Help 0 27/12/2013 12:34 AM
CONSOLE ERROR??!!?? kaos999 Server Support 0 07/08/2013 10:52 PM
Error in console. Zh3r0 Help Archive 7 28/11/2010 05:30 PM
[Help]Console error sansko Help Archive 4 16/11/2010 06:36 PM
error on console MEXICAN_NORTE Help Archive 3 09/04/2010 10:32 PM


All times are GMT. The time now is 06:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.