AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Native Error (https://forums.alliedmods.net/showthread.php?t=215730)

cstrike37 05-11-2013 14:49

[SOLVED] Native Error
 
I keep getting this error..
PHP Code:

L 05/11/2013 14:44:03: [CSTRIKEPlayer out of range (60)
L 05/11/2013 14:44:03: [AMXXDisplaying debug trace (plugin "sas.amxx")
L 05/11/2013 14:44:03: [AMXXRun time error 10native error (native "cs_get_user_model")
L 05/11/2013 14:44:03: [AMXX]    [0sas.sma::fwEmitSound (line 902

Here's line 902:
PHP Code:

public fwEmitSound(idchannel, const sound[], Float:volumeFloat:attenuationflagspitch


    
cs_get_user_model(idmodelcharsmax(model))
        
//Checks if the user is connected
    
if(!is_user_connected(id) || equal(model"sas") != 1
    return 
FMRES_IGNORED
     
    if(
containi(sound"die") != -|| containi(sound"death") != -1
    { 
        
// Here it will play your sound and block the old death sound 
    
engfunc(EngFunc_EmitSoundidchanneldie_spk[random_num(0sizeof die_spk 1)], 1.00.92flagspitch); 
         
    return 
FMRES_SUPERCEDE
    } 
     
    return 
FMRES_IGNORED


How can I fix this?

/Solved

YamiKaitou 05-11-2013 17:16

Re: Native Error
 
You are missing a line from the error log, there should be 1 more above what you have there.

hleV 05-11-2013 17:48

Re: Native Error
 
Check if id is connected BEFORE getting the model.

cstrike37 05-11-2013 20:31

Re: Native Error
 
Quote:

Originally Posted by YamiKaitou (Post 1950161)
You are missing a line from the error log, there should be 1 more above what you have there.

PHP Code:

[CSTRIKEPlayer out of range (60

Quote:

Originally Posted by hleV (Post 1950185)
Check if id is connected BEFORE getting the model.

I'll try and post the result
EDIT:
Worked perfectly! Thanks!


All times are GMT -4. The time now is 16:20.

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