Raised This Month: $ Target: $400
 0% 

Run time error 10


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
trup1k
Member
Join Date: Nov 2009
Old 07-13-2010 , 15:52   Run time error 10
Reply With Quote #1

Help fix plugin
Quote:
L 07/13/2010 - 13:17:01: Start of error session.
L 07/13/2010 - 13:17:01: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20100713.log")
L 07/13/2010 - 13:17:01: [CSTRIKE] Invalid player 5
L 07/13/2010 - 13:17:01: [AMXX] Displaying debug trace (plugin "respawn.amxx")
L 07/13/2010 - 13:17:01: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 07/13/2010 - 13:17:01: [AMXX] [0] text01BIFk.sma::player_spawn (line 23)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <cstrike>
public plugin_init()
{
    
register_plugin("respawn","1","atambo")
    
register_cvar("sv_respawn","1")
    
register_event("DeathMsg","on_Death","a")
    
register_forward(FM_SetModel,"check_model",0)
}
public 
on_Death()
{
    if(
get_cvar_num("sv_respawn")!=1)
        return 
PLUGIN_CONTINUE
    
new id read_data(2)
    
set_task(0.5,"player_spawn",id)
    
set_task(0.7,"player_spawn",id)
    return 
PLUGIN_CONTINUE
}
public 
player_spawn(id)
{
    if(
cs_get_user_team(id)==CS_TEAM_SPECTATOR)
        return 
PLUGIN_CONTINUE
    spawn
(id)
    return 
PLUGIN_CONTINUE
}
public 
check_model(id)
{
    if(
get_cvar_num("sv_respawn")!=1)
        return 
PLUGIN_CONTINUE
    
if(!is_user_connected(id) || is_user_alive(id))
        return 
PLUGIN_CONTINUE
    
new model[32]
    
cs_get_user_model(id,model,31)
    if(
containi(model,"urban")!=-|| containi(model,"terror")!=-|| containi(model,"leet")!=-|| containi(model,"arctic")!=-|| containi(model,"gsg")!=-|| containi(model,"gign")!=-|| containi(model,"sas")!=-|| containi(model,"guerilla")!=-|| containi(model,"vip")!=-1)
    {
        
set_task(0.5,"player_spawn",id)
        
set_task(0.7,"player_spawn",id)
    }
    return 
PLUGIN_CONTINUE

trup1k is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 07-13-2010 , 16:35   Re: Run time error 10
Reply With Quote #2

Check if the user is connected in player_spawn
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
trup1k
Member
Join Date: Nov 2009
Old 07-13-2010 , 16:38   Re: Run time error 10
Reply With Quote #3

Show where and what needs to be fixed.
thanks.
trup1k is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 07-13-2010 , 17:07   Re: Run time error 10
Reply With Quote #4

Quote:
Originally Posted by trup1k View Post
Show where
Quote:
Originally Posted by Emp` View Post
in player_spawn


Quote:
Originally Posted by trup1k View Post
what needs to be fixed.
Quote:
Originally Posted by Emp` View Post
Check if the user is connected
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-13-2010 , 17:10   Re: Run time error 10
Reply With Quote #5

Emp++ lol
__________________
fysiks 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 07:07.


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