AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FATAL ERROR (shutting down): WRITE_SHORT called with no active message (https://forums.alliedmods.net/showthread.php?t=68060)

Arkshine 03-07-2008 04:47

FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
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.

ConnorMcLeod 03-07-2008 06:34

Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
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 :down:

Arkshine 03-07-2008 07:18

Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
Even with your code, it still crashes my server. ( cs 1.6 )

ConnorMcLeod 03-07-2008 07:30

Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
Tested on cz and 1.6, works :D
I think filters are useless.

Arkshine 03-07-2008 08:06

Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
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.

KiWigamez0r 08-29-2009 05:33

Re: FATAL ERROR (shutting down): WRITE_SHORT called with no active message
 
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 :)


All times are GMT -4. The time now is 05:29.

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