This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved error 4: index out of bounds (SG Teleport)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 03-02-2022 , 11:51   error 4: index out of bounds (SG Teleport)
Reply With Quote #1

Hi, well i try to make it work when you get sg teleport, but when you don't, make it work like normal smoke

I got it by doing this in the code:

PHP Code:
new bool:gHasBatman[SH_MAXSLOTS+1// its like [MAX_PLAYERS+1];

public plugin_init()
{
      
register_forward(FM_EmitSound"forward_emitsound")
      
register_forward(FM_PlaybackEvent"forward_playbackevent"false)
    
// we do not precaching, but retrieving the indexes
    
g_spriteid_steam1 engfunc(EngFunc_PrecacheModel"sprites/steam1.spr")
    
g_eventid_createsmoke engfunc(EngFunc_PrecacheEvent1"events/createsmoke.sc")
}

public 
forward_playbackevent(flagsinvokereventindex
{    
    if ( !
gHasBatman[invoker] ) return FMRES_IGNORED
    
// we do not need a large amount of smoke 
    
if( eventindex == g_eventid_createsmoke)
        return 
FMRES_SUPERCEDE

    
return FMRES_IGNORED

but I get error 4 every time the SG explodes

HTML Code:
L 03/02/2022 - 13:27:11: [AMXX] Displaying debug trace (plugin "sh_batman.amxx", version "1.2.0.14")
L 03/02/2022 - 13:27:11: [AMXX] Run time error 4: index out of bounds 
L 03/02/2022 - 13:27:11: [AMXX]    [0] sh_batman.sma::forward_playbackevent (line 3

Last edited by Arje; 03-02-2022 at 13:00.
Arje is offline
 



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 17:32.


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