Raised This Month: $ Target: $400
 0% 

[AMXX] Run time error 10: native error (native "cs_get_user_team")


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 11-17-2012 , 02:32   [AMXX] Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #1

i keep getting a run time error with this function..

PHP Code:
public ShowHud(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
    
set_hudmessage(025500.020.2);
    
show_hudmessage(id"Shop Credits ( %i )"Shop_XP[id]);
    
set_task(1.0"ShowHud"id);
    }


Code:
[CSTRIKE] Invalid player 1

[AMXX] Run time error 10: native error (native "cs_get_user_team")
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-17-2012 , 02:33   Re: [AMXX] Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #2

Check if player is connected first.
__________________

Last edited by fysiks; 11-17-2012 at 02:33.
fysiks is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 11-17-2012 , 03:09   Re: [AMXX] Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #3

do i check it in this code?

PHP Code:
public ShowHud(id

    if(
cs_get_user_team(id) == CS_TEAM_T
    { 
    
set_hudmessage(025500.020.2); 
    
show_hudmessage(id"Shop Credits ( %i )"Shop_XP[id]); 
    
set_task(1.0"ShowHud"id); 
    } 


???
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-17-2012 , 04:19   Re: [AMXX] Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #4

You can answer that yourself.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2012 , 06:13   Re: [AMXX] Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #5

From where si "ShowHud" function sent ?
Sounds like it is sent from somewhere you think an index is passed, and that if it is not the case, 0 is passed instead, like HLTV new round event.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 19:55.


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