Raised This Month: $32 Target: $400
 8% 

FATAL ERROR (shutting down): Invalid message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 11-20-2013 , 10:46   FATAL ERROR (shutting down): Invalid message
Reply With Quote #1

Code:
L 11/20/2013 - 16:35:36: FATAL ERROR (shutting down): Invalid message;  cannot use broadcast message with a target entity
Ok guys, this is the error, and this is the code :

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Bomb Blast"
#define VERSION "0.4"
#define AUTHOR "K.K.Lv"

new HamHook:g_BombThink

new g_Bomb

new g_SpriteCircle

new Float:g_fExplodeTime
new Float:g_fNextBlastGameTime

public plugin_precache()
{
    
g_SpriteCircle precache_model"sprites/shockwave.spr" )
}

public 
plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
    if( 
find_ent_by_classFM_NULLENT"func_bomb_target" ) || find_ent_by_classFM_NULLENT"info_bomb_target" ) )
    {
        
g_BombThink RegisterHamHam_Think"grenade""Bomb_Think")
        
        
register_event"HLTV""Stop""a""1=0""2=0" )
        
register_logevent"Stop"2"1=Round_End" )
        
        
register_logevent"PlantedBomb"3"2=Planted_The_Bomb" )
    }
}

public 
Stop()
{
    
g_Bomb 0
    DisableHamForward
g_BombThink)
}

public 
PlantedBomb()
{
    new 
C4 FM_NULLENT
    
while( ( C4 find_ent_by_classC4"grenade" ) ) )
    {
        if ( 
get_pdata_intC496 ) & ( 1<<) )
        {
            
g_Bomb C4
            g_fExplodeTime 
get_pdata_floatg_Bomb100 )
            
EnableHamForwardg_BombThink )
            
            
g_fNextBlastGameTime 0.0
            
break 
        }
    }
}

public 
Bomb_ThinkiEnt )
{
    if ( 
g_Bomb != iEnt )
        return
    
    new 
Float:fGameTime get_gametime()
    if( 
g_fNextBlastGameTime fGameTime )
        return
    
    new 
Float:fTimeiTimeFloat:fThinkTime
    
    fTime 
g_fExplodeTime fGameTime
    iTime 
floatroundfTime )
    
    if ( 
iTime 13 fThinkTime 1.0
    
else if ( iTime fThinkTime 0.5
    
else  fThinkTime 0.3
    
    g_fNextBlastGameTime 
fGameTime fThinkTime
    
    create_blast_circle
iEnt )
}

public 
create_blast_circleiEnt ) {
    new 
Float:fOrigin]
    
    
peviEntpev_originfOrigin )
    
    
engfuncEngFunc_MessageBeginMSG_BROADCASTSVC_TEMPENTITYfOrigin )
    
write_byteTE_BEAMCYLINDER )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] + 35 )
    
write_shortg_SpriteCircle )
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte//R
    
write_byte100 //G
    
write_byte255 //B
    
write_byte128 )
    
write_byte)
    
message_end()
    
    
engfuncEngFunc_MessageBeginMSG_BROADCASTSVC_TEMPENTITYfOrigin )
    
write_byteTE_BEAMCYLINDER )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] + 70 )
    
write_shortg_SpriteCircle )
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte255 //R
    
write_byte//G
    
write_byte//B
    
write_byte128 )
    
write_byte)
    
message_end()
    
    
engfuncEngFunc_MessageBeginMSG_BROADCASTSVC_TEMPENTITYfOrigin )
    
write_byteTE_BEAMCYLINDER )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] )
    
engfuncEngFunc_WriteCoordfOrigin] + 100 )
    
write_shortg_SpriteCircle )
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte)
    
write_byte100 //R
    
write_byte255 //G
    
write_byte128 //B
    
write_byte)
    
message_end()

I did some research and there is just 1 topic with the same problem, but the guy couldn't find the solution either.

How can i solve this?
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 11-20-2013 , 11:03   Re: FATAL ERROR (shutting down): Invalid message
Reply With Quote #2

engfunc( EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, fOrigin )

->

engfunc( EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, fOrigin, 0 )
akcaliberg is offline
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 11-20-2013 , 11:52   Re: FATAL ERROR (shutting down): Invalid message
Reply With Quote #3

Quote:
Originally Posted by akcaliberg View Post
engfunc( EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, fOrigin )

->

engfunc( EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, fOrigin, 0 )

This worked, thank you.
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
Reply



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 16:02.


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