Raised This Month: $ Target: $400
 0% 

Error on get_user_weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dejan
Senior Member
Join Date: Mar 2009
Location: Sweden
Old 04-02-2011 , 14:15   Error on get_user_weapon
Reply With Quote #1

Could anyone tell me why i get this errors?

PHP Code:
L 04/02/2011 08:32:29: [AMXXDisplaying debug trace (plugin "achieve.amxx")
L 04/02/2011 08:32:29: [AMXXRun time error 10native error (native "get_user_weapon")
L 04/02/2011 08:32:29: [AMXX]    [0achieve.sma::eDeath (line 222)
L 04/02/2011 08:41:49Invalid player id 0 
heres the code

PHP Code:
public eDeath() 
{
    new 
Killer read_data(1);
    new 
weapon get_user_weapon(Killer);

__________________
dejan is offline
Send a message via Skype™ to dejan
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 04-02-2011 , 14:21   Re: Error on get_user_weapon
Reply With Quote #2

killer > 0 && killer < 33
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-02-2011 , 16:55   Re: Error on get_user_weapon
Reply With Quote #3

Quote:
Originally Posted by gladius View Post
killer > 0 && killer < 33
Code:
new g_max_players; public plugin_init() {     g_max_players = get_maxplayers(); } public eDeath() {     new Killer = read_data(1);     if( 1 <= Killer <= g_max_players )     {         new weapon = get_user_weapon(Killer);                 // other code     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 04-03-2011 , 10:11   Re: Error on get_user_weapon
Reply With Quote #4

Might be better to do an is_user_alive(Killer) if you're going to be getting the current weapon..
Elusive138 is offline
dejan
Senior Member
Join Date: Mar 2009
Location: Sweden
Old 04-03-2011 , 18:05   Re: Error on get_user_weapon
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Code:
new g_max_players;

public plugin_init() { g_max_players = get_maxplayers();
} public eDeath() { new Killer = read_data(1);
if( 1 <= Killer <= g_max_players ) { new weapon = get_user_weapon(Killer);

// other code } }

Thanks
__________________
dejan is offline
Send a message via Skype™ to dejan
Old 11-04-2012, 11:45
eniyac
This message has been deleted by YamiKaitou. Reason: unrelated to the thread
Old 11-04-2012, 14:12
fysiks
This message has been deleted by YamiKaitou. Reason: unrelated to the thread
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 14:33.


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