Raised This Month: $12 Target: $400
 3% 

FATAL ERROR (shutting down): WRITE_SHORT called with no active message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2008 , 04:47   FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #1

I've changed the way of original 'Colored Flashbangs' plugin by v3x.

It works fine under windows. But under linux, I always get this error when someone/bot connects the server :

Code:
FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Code:
    public plugin_init()     {         register_plugin( Plugin, Version, Author );         register_message( get_user_msgid( "ScreenFade" ), "m_ScreenFade" );     }     public m_ScreenFade( msg_id, msg_type, msg_entity )     {         if ( is_user_bot( msg_entity ) )             return;         if ( get_msg_arg_int( 4 ) != 255 || get_msg_arg_int( 5 ) != 255 || get_msg_arg_int( 6 ) != 255 )             return;         set_msg_arg_int( 4, ARG_BYTE, random_num( 1, 255 ) );         set_msg_arg_int( 5, ARG_BYTE, random_num( 1, 255 ) );         set_msg_arg_int( 6, ARG_BYTE, random_num( 1, 255 ) );     }

I really don't get why it's crashing only under linux.

( I've tested without others plugins )


Thanks in advance.
__________________

Last edited by Arkshine; 03-17-2008 at 21:04.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-07-2008 , 06:34   Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #2

This just works fine for me :

PHP Code:
/* AMX Mod X Plugin

* (c) Copyright 2008, ConnorMcLeod 
* This file is provided as is (no warranties). 

*/ 

#include <amxmodx>
// #include <fakemeta>

public plugin_init()
{
    
register_plugin("Colored FlashBang""0.1""ConnorMcLeod")
    
register_message(get_user_msgid("ScreenFade"), "Hook_ScreenFade")
}

public 
Hook_ScreenFade(osefMSG_Typemsg_ent)
{
    if(
MSG_Type != MSG_ONE)
    {
        
_log("Mauvais MSG_Type = %d"MSG_Type)
        return
    }
    static 
argsnum
    argsnum 
get_msg_args()
    if(
argsnum != 7)
    {
        
_log("argsnum = %d"argsnum)
        return
    }
    
    static 
Float:fOrigin[3]
    
get_msg_origin(fOrigin)
    if(
fOrigin[0] || fOrigin[1] || fOrigin[2])
    {
        
_log("Origine non nulle <%f><%f><%f>"fOrigin[0], fOrigin[1], fOrigin[2])
        return
    }

    if( 
get_msg_arg_int(4) != 255 || get_msg_arg_int(5) != 255 || get_msg_arg_int(6) != 255 )
        return
    
    static 
iAlpha
    iAlpha 
get_msg_arg_int(7)
    if(
iAlpha != 200 && iAlpha != 255)
        return

    
set_msg_arg_int(40random_num(1,255))
    
set_msg_arg_int(50random_num(1,255))
    
set_msg_arg_int(60random_num(1,255))
}

_log(const string[], any:...)
{
    static const 
szLogfile[] = "ColFlash.log"
    
static szMessage[256]
    if(
read_argc())
    {
        
vformat(szMessage255string2)
        
log_to_file(szLogfileszMessage)
    }
    else
    {
        
log_to_file(szLogfilestring)
    }

Also :

Code:
if ( get_msg_arg_int( 4 ) != 255 && get_msg_arg_int( 5 ) != 255 && get_msg_arg_int( 6 ) != 255 )

should be :

Code:
if ( get_msg_arg_int( 4 ) != 255 || get_msg_arg_int( 5 ) != 255 || get_msg_arg_int( 6 ) != 255 )

Boulet
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-07-2008 at 06:43.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2008 , 07:18   Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #3

Even with your code, it still crashes my server. ( cs 1.6 )
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-07-2008 , 07:30   Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #4

Tested on cz and 1.6, works
I think filters are useless.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2008 , 08:06   Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #5

After some tests, it appears that AXN ( metamod plugin ) is causing some problems. It shouldn't.

Without AXN, the plugin works fine under linux now. I will try to figure out why.


EDIT : In fact it crashes unders windows too. I've forgot to install AXN. xD.
__________________

Last edited by Arkshine; 03-07-2008 at 08:29.
Arkshine is offline
KiWigamez0r
Junior Member
Join Date: Aug 2009
Old 08-29-2009 , 05:33   Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Reply With Quote #6

I'm getting the exact same error and the exact same circumstances too, but I get them when I try to run any version of zombie plague or hide'n'seek (any version, I've tried multiple). Any help would be appreciated
KiWigamez0r is offline
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

Forum Jump


All times are GMT -4. The time now is 04:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode