Raised This Month: $ Target: $400
 0% 

Again native error (native "set_view")


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-22-2009 , 04:00   Again native error (native "set_view")
Reply With Quote #1

Whats the prob.?
PHP Code:
public event_deathmsgM()
{
    if( !(
<= read_data(2) <= g_max_clients) ) return;
    
    
g_alive[read_data(2)] = false;
 
    
g_glowtask[read_data(2)] = false;
    
    
g_Player_Item_Picked[read_data(2)] = false;
 
    
ResetItems(read_data(2)); // Here error

PHP Code:
ResetItems(client)
{
    if( !(
<= client <= g_max_clients) ) return;
    
    if( 
pev_valid(g_ent[client]) )
    {
        
engfunc(EngFunc_RemoveEntityg_ent[client]);
        
g_ent[client] = 0;
    }
            
    
set_view(client,CAMERA_NONE); // Here error

Quote:
L 06/22/2009 - 10:27:29: [ENGINE] Invalid player 22
L 06/22/2009 - 10:27:29: [AMXX] Displaying debug trace (plugin "medic_mod.amxx")
L 06/22/2009 - 10:27:29: [AMXX] Run time error 10: native error (native "set_view")
L 06/22/2009 - 10:27:29: [AMXX] [0] medic_mod.sma::ResetItems (line 60
L 06/22/2009 - 10:27:29: [AMXX] [1] medic_mod.sma::event_deathmsgM (line 534)
xbatista is offline
Send a message via Skype™ to xbatista
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-22-2009 , 04:08   Re: Again native error (native "set_view")
Reply With Quote #2

PHP Code:
new victim read_data(2);
ResetItems(victim); 
Try something like that.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-22-2009 , 04:26   Re: Again native error (native "set_view")
Reply With Quote #3

That would not help...
xbatista is offline
Send a message via Skype™ to xbatista
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-22-2009 , 04:33   Re: Again native error (native "set_view")
Reply With Quote #4

PHP Code:
public event_deathmsgM() 

    new 
victim read_data(2);
 
    
g_alive[victim] = false
 
    
g_glowtask[victim] = false
 
    
g_Player_Item_Picked[victim] = false
 
    
ResetItems(victim);

PHP Code:
ResetItems(client

    if( 
pev_valid(g_ent[client]) ) 
    { 
        
engfunc(EngFunc_RemoveEntityg_ent[client]); 
        
g_ent[client] = 0
    } 
 
    
set_view(client,CAMERA_NONE);

Since this is only used on one player, we wont need to loop the players.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 06-22-2009 , 04:41   Re: Again native error (native "set_view")
Reply With Quote #5

Quote:
to loop the players.
I don't loop through players, I just check through players if "is player,not entity"
And this:
PHP Code:
new victim read_data(2);
     
ResetItems(victim
The same as this:
PHP Code:
ResetItems(read_data(2)) 
I think I know why return error:
PHP Code:
set_view(client,CAMERA_NONE); 
This only can run when player is alive, but I need to set_view when he died, cuz I'm running in one place of plugin 3RDPERSON camera.

Last edited by xbatista; 06-22-2009 at 04:54.
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-22-2009 , 05:06   Re: Again native error (native "set_view")
Reply With Quote #6

Again, your error is because you do something on a client disconnected or not in game yet. You have to check if the player is connected or alive.
__________________
Arkshine 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 15:42.


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