Raised This Month: $ Target: $400
 0% 

[Help] Native errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 08-14-2011 , 09:36   Re: [Help] Native errors
Reply With Quote #6

Quote:
Originally Posted by drekes View Post
Connor made a typo. Should be cs_get_user_team(id).
Thanks for notifying, I already wondered why it looked like that Also you could confirm this would be better / more efficient, right? (the way I posted it). Since it also contains get_user_team(attacker) I would say you should cache the get_user_team part instead of also the id.

Edit:

I've now done it like this:
PHP Code:
    new Team cs_get_user_team(id)
    new 
TeamA cs_get_user_team(attacker)
    if( 
is_user_alive(id)){
        if(
TeamA!=Team)
             
set_user_frags(attacker,get_user_frags(attacker) +1); // The line where to error comes
    
        
if(TeamA==Team)
            
set_user_frags(attacker,get_user_frags(attacker) -1); 
However upon compiling I get the error tag mismatched, I assume this is because of this: UTIL_Kill(attacker,id,weapon[]) (that's what I think it is since as I stated I'm trying to learn PAWN all by myself by looking at other people their work).

Last edited by egbertjan; 08-14-2011 at 10:05.
egbertjan is offline
 



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 03:26.


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