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

Massive error output?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 02-03-2011 , 16:15   Massive error output?
Reply With Quote #1

Well... Long time since I posted a help request here..


I dont know why the hell Im getting this:

fm_CmdStart


NET_GetLong: Ignoring duplicated split packet 1 of 2 ( 1391 bytes )
NET_GetLong: Ignoring duplicated split packet 2 of 2 ( 79 bytes)

Jesus Christ
Jesus Christ
Jesus Christ


(Actually having like 300 "Jesus Christ" prints before the server crashes with no HLDS error window.
Jesus Christ being what I printed (oh noes my CS has turned into a religious fanatic!)

When I turned debug on it spammed the server console with run time error 10's: trace line bla bla for the client_print line saying id 57 is not valid or something:

Code:
L 02/03/2011 - 21:31:59: [AMXX]    [0] sh_the_new_gas_test.sma::fm_Touch (line 241)
L 02/03/2011 - 21:32:00: Invalid player id 57
With this code:


PHP Code:
public fm_CmdStart(iduc_handleseed)
{
    
client_print(idprint_console"Jesus Christ")
    
    if ( !
sh_is_active() || !gHasExterminator[id] || !is_user_alive(id) || sh_is_freezetime() ) return FMRES_IGNORED

    
if ( (get_uc(uc_handleUC_Buttons) & IN_ATTACK2) && !(pev(idpev_oldbuttons) & IN_ATTACK2) ) {
        if ( 
get_user_weapon(id) == CSW_MP5NAVY ) {
            
launch_nade(id)
            
            
client_print(idprint_console"launch_nade call")
        }
    }

    return 
FMRES_IGNORED


Taken from Fr33m@n's 1.2.0.14 Veronica version here
http://forums.alliedmods.net/showpos...6&postcount=54

Thanks for any replies. Yes I have edited the weapon used to be MP5NAVY.
__________________

Last edited by The Art of War; 02-03-2011 at 16:19.
The Art of War is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 02-03-2011 , 16:44   Re: Massive error output?
Reply With Quote #2

Art the number of message is not related to your crash.
your crash is located on fm_touch.

FM_CmdStart like client_PreThink is called more than 100 times per seconds.
This is why we try to avoid them when we can. But in your case, we can't.
Fr33m@n is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-03-2011 , 22:55   Re: Massive error output?
Reply With Quote #3

Make the valid player check before client_print(), then you won't have all those annoying runtime errors. The crash will still persist, though.
Never ran into that error before so just try googling it and see if you find any viable information.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 02-04-2011 , 03:28   Re: Massive error output?
Reply With Quote #4

Quote:
Originally Posted by DarkGod View Post
Make the valid player check before client_print(), then you won't have all those annoying runtime errors. The crash will still persist, though.
Never ran into that error before so just try googling it and see if you find any viable information.
Are we talking in the fm_Touch forward now? Becuase if I set the print somewhere after any checks in fm_CmdStart it still crashes but Im not getting any prints at all, though still the same runtime errors in the logs..

Well what I came up with from some google searching was just mostly CS:S servers having problems with a lot of lag and such. Also found an unanswered thread here on AM about some similar errors and another yet unsolved when a guy used fakedamage to do something..


EDIT: Now I tried to move the print to the same place as before, and now I got kicked from the server with the words: Reliable Channel Overflowed, though the server is still running... Im kind of confused as I seem to get different errors all the time.
Though it printed all of the Jesus Christ's.

Now I got this instead:

Code:
L 02/04/2011 - 09:30:23: [AMXX] Displaying debug trace (plugin "sh_the_new_gas_test.amxx")
L 02/04/2011 - 09:30:23: [AMXX] Run time error 10: native error (native "client_print")
L 02/04/2011 - 09:30:23: [AMXX]    [0] sh_the_new_gas_test.sma::fm_Touch (line 242)
L 02/04/2011 - 09:30:23: Invalid player id 56
with

PHP Code:
client_print(ptrprint_console"pev, ptr, classnames"
Which I guess is why it fails.

I know its not good to print ptr... And yes its most likely to cause the error I guess. Problem is, I have edited the code a lot in that part though I left CmdStart untouched except from changing a few checks of course.
The entire Touch forward is a complete mess, but if anyone wants to help me out and needs the code just tell me

And yes, there is no id = in my Touch forward anymore, so thats why I didnt use id as the index of the print.
__________________

Last edited by The Art of War; 02-04-2011 at 03:37.
The Art of War is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 02-04-2011 , 07:43   Re: Massive error output?
Reply With Quote #5

ptr= pToucher
ptd = pTouched

toucher is the entity who touch something
touched is the thing who is touched (floor, player, another entity and so on.)

// the owner of the entity (if owner was setted at entity creation)
new owner = pev(ptr, pev_owner)

Last edited by Fr33m@n; 02-04-2011 at 07:50.
Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 02-07-2011 , 11:55   Re: Massive error output?
Reply With Quote #6

Well, so..... I cleaned the code up a lot, and I actually made it not crash the server at all. Though I get 2 tag mismatches on compile, so I guess thats what causing this shit not to cause any damage. I did make one version do damage, but it was the funniest bug Ive ever encountered. Instead of making damage within a radius of the exploded grenade, it made damage to all enemies no matter if they were in range, IF I were in the radius of the exploded grenade...

At first I though I must have failed some check, but then I came up with another thing: Maybe the use of ptr in the damage forward called poison isnt the best way, but heck I got the damage working once so I guess its possible.. And I dont see what can cause it.

So, any help would be nice


PHP Code:
// Exterminator!

/* CVARS - copy and paste to shconfig.cfg

//Exterminator 
exterminator_level 22
exterminator_mult 2.0        //Damage multiplyer for mp5
exterminator_grenades 5        //Grenades given
exterminator_m203rad 500        //Radius of people affected by a grenade
exterminator_m203maxdmg 200        //Max Grenades a mine can cause

*/

// Thanks to the original code of MP5+203 Mod by PaintLancer

#include <superheromod>

// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Exterminator"
new bool:gHasExterminator[SH_MAXSLOTS+1]
new 
gAmmo[SH_MAXSLOTS+1]

new const 
gPowerClass[] = "m203_nade"
new const gSoundLaunch[] = "shmod/glauncher.wav"
new const gSoundExplode[] = "shmod/a_exm2.wav"
new const gModelMP5[] = "models/shmod/exterminator_mp5.mdl"
new const gModelGrenade[] = "models/grenade.mdl"
new gSpriteTrail

new iGas

new gmsgStatusIcon
new pCvarGrenadespCvarRadiuspCvarMaxDamagepCvarTime
//----------------------------------------------------------------------------------------------
public plugin_init()
{
    
// Plugin Info
    
register_plugin("SUPERHERO Exterminator""1.0""The Art of War")

    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    
new pcvarLevel register_cvar("exterminator_level""22")
    new 
pcvarMult register_cvar("exterminator_mp5mult""2.0")
    
pCvarGrenades register_cvar("exterminator_grenades""50")
    
pCvarRadius register_cvar("exterminator_m203rad""500")
    
pCvarMaxDamage register_cvar("exterminator_m203maxdmg""20")
    
pCvarTime register_cvar("exterminator_time""0.5")

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
    
gHeroID sh_create_hero(gHeroNamepcvarLevel)
    
sh_set_hero_info(gHeroID"Mp5 Gas Grenades""MP5 Gas Grenade Launcher. Use Your Right Mouse Button To Fire.")
    
sh_set_hero_dmgmult(gHeroIDpcvarMultCSW_MP5NAVY)
    
sh_set_hero_shield(gHeroIDtrue)

    
// REGISTER EVENTS THIS HERO WILL RESPOND TO!
    
register_event("CurWeapon""weapon_change""be""1=1")
    
register_forward(FM_CmdStart"fm_CmdStart")
    
register_forward(FM_Touch"fm_Touch")

    
gmsgStatusIcon get_user_msgid("StatusIcon")
}
//----------------------------------------------------------------------------------------------
public plugin_precache()
{
    
precache_sound(gSoundLaunch)
    
precache_sound(gSoundExplode)
    
precache_model(gModelMP5)
    
gSpriteTrail precache_model("sprites/smoke.spr")
    
iGas precache_model("sprites/shmod/gas.spr")
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
{
    if ( 
gHeroID != heroID ) return

    switch(
mode) {
        case 
SH_HERO_ADD: {
            
gHasExterminator[id] = true
            gAmmo
[id] = get_pcvar_num(pCvarGrenades)
            
exterminator_weapons(id)
            
switchmodel(id)
        }

        case 
SH_HERO_DROP: {
            
gHasExterminator[id] = false
            
if ( is_user_alive(id) ) {
                
sh_drop_weapon(idCSW_MP5NAVYtrue)
            }
        }
    }

    
sh_debug_message(id1"%s %s"gHeroNamemode "ADDED" "DROPPED")
}
//----------------------------------------------------------------------------------------------
public sh_client_spawn(id)
{
    
gPlayerInCooldown[id] = false

    
if ( gHasExterminator[id] ) {
        
exterminator_weapons(id)
        
gAmmo[id] = get_pcvar_num(pCvarGrenades)
    }
}
//----------------------------------------------------------------------------------------------
exterminator_weapons(id)
{
    if ( 
sh_is_active() && is_user_alive(id) && gHasExterminator[id] ) {
        
sh_give_weapon(idCSW_MP5NAVY)
    }
}
//----------------------------------------------------------------------------------------------
switchmodel(id)
{
    if ( !
sh_is_active() || !is_user_alive(id) || !gHasExterminator[id] ) return

    if ( 
get_user_weapon(id) == CSW_MP5NAVY ) {
        
set_pev(idpev_viewmodel2gModelMP5)
    }
}
//----------------------------------------------------------------------------------------------
public weapon_change(id)
{
    if ( !
sh_is_active() || !gHasExterminator[id] ) return

    
//weaponID = read_data(2)
    
if ( read_data(2) != CSW_MP5NAVY ) {
        
ammo_hud(id0)
        return
    }
    else {
        
ammo_hud(id1)
    }

    
switchmodel(id)
}
//----------------------------------------------------------------------------------------------
public fm_CmdStart(iduc_handleseed)
{
    if ( !
sh_is_active() || !gHasExterminator[id] || !is_user_alive(id) || sh_is_freezetime() ) return FMRES_IGNORED

    
if ( (get_uc(uc_handleUC_Buttons) & IN_ATTACK2) && !(pev(idpev_oldbuttons) & IN_ATTACK2) ) {
        if ( 
get_user_weapon(id) == CSW_MP5NAVY ) {
            
launch_nade(id)
        }
    }

    return 
FMRES_IGNORED
}
//----------------------------------------------------------------------------------------------
launch_nade(id)
{
    if ( 
gPlayerInCooldown[id] ) {
        
sh_sound_deny(id)
        return 
FMRES_IGNORED
    
}
    if ( 
gAmmo[id] == ) {
        
client_print(idprint_center"You are out of Gas grenades!")
        
sh_sound_deny(id)
        return 
FMRES_IGNORED
    
}

    
send_weapon_anim(id3)

    new 
Ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    if ( !
Ent ) return FMRES_IGNORED

    set_pev
(Entpev_classnamegPowerClass)
    
engfunc(EngFunc_SetModelEntgModelGrenade)

    
engfunc(EngFunc_SetSizeEnt, {-1.0, -1.0, -1.0}, {1.01.01.0})

    new 
Float:fl_Origin[3], Float:fl_Angles[3], Float:fl_vAngle[3]
    
// Get users postion and angles
    
pev(idpev_originfl_Origin)
    
pev(idpev_anglesfl_Angles)
    
pev(idpev_v_anglefl_vAngle)

    
// Change height of entity origin
    
fl_Origin[2] += 10.0

    
// Set entity postion and angles
    
engfunc(EngFunc_SetOriginEntfl_Origin)
    
set_pev(Entpev_anglesfl_Angles)
    
set_pev(Entpev_v_anglefl_vAngle)

    
// Set properties of the entity
    
set_pev(Entpev_effectsEF_MUZZLEFLASH)
    
set_pev(Entpev_solidSOLID_BBOX)
    
set_pev(Entpev_movetypeMOVETYPE_TOSS)
    
set_pev(Entpev_ownerid)

    new 
Float:fl_Velocity[3]
    
velocity_by_aim(id2000fl_Velocity)

    
set_pev(Entpev_velocityfl_Velocity)

    
emit_sound(idCHAN_WEAPONgSoundLaunchVOL_NORMATTN_NORM0PITCH_NORM)

    
// remove an ammo and refresh the hud
    
ammo_hud(id0)
    
gAmmo[id]--
    
ammo_hud(id1)

    new 
parm[1]
    
parm[0] = Ent
    set_task
(0.2"grenade_trail"idparm1)
    
sh_set_cooldown(id2.0)

    return 
FMRES_IGNORED
}
//----------------------------------------------------------------------------------------------
send_weapon_anim(idiAnim)
{
    
set_pev(idpev_weaponanimiAnim)

    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM_id)
    
write_byte(iAnim)
    
write_byte(pev(idpev_body))
    
message_end()
}
//----------------------------------------------------------------------------------------------
public fm_Touch(ptrptd)
{
    
    if ( !
sh_is_active() ) return FMRES_IGNORED
    
if ( !pev_valid(ptr) ) return FMRES_IGNORED
    
    
static classname[32]
    
classname[0] = '^0'
    
pev(ptrpev_classnameclassnamecharsmax(classname))

    if( 
equal(classnamegPowerClass) ) {
        new 
id pev(ptrpev_owner)

        
client_print(idprint_console"classnames, floats")
        
        new 
Float:fl_vExplodeAt[3]

        
pev(ptrpev_originfl_vExplodeAt)
        
        new 
players[SH_MAXSLOTS], playerCountvictim
        get_players
(playersplayerCount"ah")

        for ( new 
0playerCounti++ ) {
            
victim players[i]
            
            
client_print(idprint_console"Poison Gas Task")
                
            
set_task(get_pcvar_float(pCvarTime), "poison"victim__"a"40)
        }


        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(100)//radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
        
write_short(iGas)//modelindex)
        
write_byte(10)//count)
        
write_byte(24)//flags)
        
write_byte(200)//duration (in seconds) * 10) (will be randomized a bit)
        
message_end()
        
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(100)//radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
        
write_short(iGas)//modelindex)
        
write_byte(10)//count)
        
write_byte(24)//flags)
        
write_byte(200)//duration (in seconds) * 10) (will be randomized a bit)
        
message_end()
        
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(100)//radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
        
write_short(iGas)//modelindex)
        
write_byte(10)//count)
        
write_byte(24)//flags)
        
write_byte(200)//duration (in seconds) * 10) (will be randomized a bit)
        
message_end()
        
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(100)//radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
        
write_short(iGas)//modelindex)
        
write_byte(10)//count)
        
write_byte(24)//flags)
        
write_byte(200)//duration (in seconds) * 10) (will be randomized a bit)
        
message_end()
        
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(100)//radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
        
write_short(iGas)//modelindex)
        
write_byte(10)//count)
        
write_byte(24)//flags)
        
write_byte(200)//duration (in seconds) * 10) (will be randomized a bit)
        
message_end()
        
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_FIREFIELD )
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(150)
        
write_short(iGas)
        
write_byte(10)
        
write_byte(TEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT)
        
write_byte(200)
        
message_end()
        
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_FIREFIELD )
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(150)
        
write_short(iGas)
        
write_byte(10)
        
write_byte(TEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT)
        
write_byte(200)
        
message_end()
        
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_FIREFIELD )
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(150)
        
write_short(iGas)
        
write_byte(10)
        
write_byte(TEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT)
        
write_byte(200)
        
message_end()
        
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_FIREFIELD )
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(150)
        
write_short(iGas)
        
write_byte(10)
        
write_byte(TEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT)
        
write_byte(200)
        
message_end()
        
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_FIREFIELD )
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 60)
        
write_short(150)
        
write_short(iGas)
        
write_byte(10)
        
write_byte(TEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT)
        
write_byte(200)
        
message_end()
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 10)
        
write_short(10)
        
write_short(iGas)
        
write_byte(2)
        
write_byte(TEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA)
        
write_byte(200)
        
message_end()
        
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 10)
        
write_short(10)
        
write_short(iGas)
        
write_byte(2)
        
write_byte(TEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA)
        
write_byte(200)
        
message_end()
        
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 60)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 10)
        
write_short(10)
        
write_short(iGas)
        
write_byte(2)
        
write_byte(TEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA)
        
write_byte(200)
        
message_end()
        
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] + 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 10)
        
write_short(10)
        
write_short(iGas)
        
write_byte(2)
        
write_byte(TEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA)
        
write_byte(200)
        
message_end()
        
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byte(TE_FIREFIELD)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[0] - 30)
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[1])
        
engfunc(EngFunc_WriteCoordfl_vExplodeAt[2] + 10)
        
write_short(10)
        
write_short(iGas)
        
write_byte(2)
        
write_byte(TEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA)
        
write_byte(200)
        
message_end()

        
emit_sound(ptrCHAN_WEAPONgSoundExplodeVOL_NORMATTN_NORM0PITCH_NORM)

        
engfunc(EngFunc_RemoveEntityptr)
    }

    return 
FMRES_IGNORED
}
//----------------------------------------------------------------------------------------------
public poison(ptr)    
{
    new 
id pev(ptrpev_owner)
    
    
client_print(idprint_console"Poison forward, classnames, id")

    new 
Float:maxDamage get_pcvar_num(pCvarMaxDamage)
    new 
Float:distanceBetween
    
new Float:dmgRadius get_pcvar_float(pCvarRadius)
    new 
FFOn sh_friendlyfire_on()
    new 
CsTeams:idTeam cs_get_user_team(id)
    new 
Float:vicOrigin[3]
    new 
Float:fl_vExplodeAt[3]
        
    
pev(ptrpev_originfl_vExplodeAt)    
        
    new 
players[SH_MAXSLOTS], playerCountvictim
    get_players
(playersplayerCount"ah")

    for ( new 
0playerCounti++ ) {
        
victim players[i]
    
        
pev(victimpev_originvicOrigin)
        
distanceBetween vector_distance(fl_vExplodeAtvicOrigin)
        
        if ( 
distanceBetween <= dmgRadius ) {
            if ( 
FFOn || victim != id || idTeam != cs_get_user_team(victim) ) {

                
client_print(idprint_console"Poison Gas Damage")
                
                
sh_extra_damage(victimidmaxDamage"gas"_SH_DMG_NORMtrue_fl_vExplodeAt)
            }
        }
    }
}
//-----------------------------------------------------------------------------------------
ammo_hud(idshow)
{
    new 
SpriteString[32]
    
formatex(SpriteStringcharsmax(SpriteString), "number_%d"gAmmo[id])

    if (
show && gAmmo[id] > 0) {
        
message_begin(MSG_ONEgmsgStatusIcon_id)
        
write_byte(1)    // status (0 = hide, 1 = show, 2 = flash)
        
write_string(SpriteString)
        
write_byte(0)    // r, g, b
        
write_byte(160)    // r, g, b
        
write_byte(0)    // r, g, b
        
message_end()
    }
    else {
        
message_begin(MSG_ONEgmsgStatusIcon_id)
        
write_byte(0)    // status (0 = hide, 1 = show, 2 = flash)
        
write_string(SpriteString)
        
write_byte(0)    // r, g, b
        
write_byte(0)    // r, g, b
        
write_byte(0)    // r, g, b
        
message_end()
    }
}
//----------------------------------------------------------------------------------------------
public grenade_trail(parm[])
{
    new 
Ent parm[0]

    if (
Ent) {
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW)    //22
        
write_short(Ent)
        
write_short(gSpriteTrail)
        
write_byte(10)               // life
        
write_byte(5)                // width
        
write_byte(255)            // r, g, b
        
write_byte(255)            // r, g, b
        
write_byte(255)            // r, g, b
        
write_byte(100)            // brightness
        
message_end()
    }
}
//----------------------------------------------------------------------------------------------
public sh_client_death(id)
{
    if ( 
id || id sh_maxplayers() ) return

    if ( 
gHasExterminator[id] ) {
        
ammo_hud(id0)
    }
}
//---------------------------------------------------------------------------------------------- 
Tag mismatches on sh_extradamage and the second print in poison.
__________________
The Art of War is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-07-2011 , 12:47   Re: Massive error output?
Reply With Quote #7

Code:
public poison(ptr)    
{
    new id = pev(ptr, pev_owner)
Code:
   victim = players[i]
   set_task(get_pcvar_float(pCvarTime), "poison", victim, _, _, "a", 40)
wat
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 02-07-2011 , 15:23   Re: Massive error output?
Reply With Quote #8

Lol I fail. But how can I fix it without fucking something else? As I guess I need victim as the task id and passing ptr would mean an epic failure..

Oh, and by the way I guess using ptr is working as the ent is removed after the task is called. (?)

I tried passing along id as a task param, but that failed :s
__________________

Last edited by The Art of War; 02-08-2011 at 02:57.
The Art of War is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 02-15-2011 , 14:56   Re: Massive error output?
Reply With Quote #9

So.. New status report, or something!..

Now with the help of the awesome Fr33m@n, I have been able to narrow stuff down and hopefully fix the bugs. One thing is buggering me though, I get the error 33: Array must be indexed (variable "fl_vExplodeAt") on the third line (only the one where I have added a number, in this case +60 to the variable).

Code:
	engfunc(EngFunc_WriteCoord, fl_vExplodeAt[0])
		engfunc(EngFunc_WriteCoord, fl_vExplodeAt[1])
		engfunc(EngFunc_WriteCoord, fl_vExplodeAt[2] + 60)
with the use of

PHP Code:
//Globally
new Float:fl_vExplodeAt[SH_MAXSLOTS+1][3]


public 
fm_Touch(ptrptd)
{
//bla bla bla bla some other code...
pev(ptrpev_originfl_vExplodeAt)
}

public 
poison(parm[])
{
//bla bla other stuff again..
pev(ptrpev_originfl_vExplodeAt)

Though that is just one example, Im getting it on say, perhaps 20 other lines aswell, it doesnt matter if the added value is +10, -10, +30, -30, +60, -60 and so on, it just wont let me compile.

On the lines that have no additional values I do not get any errors, so I dont really know where to start.. Any help would be appreciated!
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-15-2011 , 15:06   Re: Massive error output?
Reply With Quote #10

Index the arrays dude.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
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 05:11.


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