Raised This Month: $ Target: $400
 0% 

Passing a string in function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 03-10-2017 , 17:04   Passing a string in function
Reply With Quote #1

PHP Code:
new team[32];
get_opposite_team(idattackerteam);

stock get_opposite_team(indexteam[])
{
    new 
CsTeams:team cs_get_user_team(index);
    
    if(
team == CS_TEAM_T)
    {
        
copy(teamcharsmax(team), "TERRORIST"); // line 549;
    
}
    else
    {
        
copy(teamcharsmax(team), "CT"); // line 553;
    
}
    
    return 
0;
// line 557; 
It's obviously what i'm trying, but i got some errors.. WHY!??
Code:
D:\...\custom_stocks.inc(549) : error 035: argument type mismatch (argument 1)
D:\...\custom_stocks.inc(549) : error 035: argument type mismatch (argument 1)
D:\...\custom_stocks.inc(553) : error 035: argument type mismatch (argument 1)
D:\...\custom_stocks.inc(553) : error 035: argument type mismatch (argument 1)
D:\...\custom_stocks.inc(557) : warning 203: symbol is never used: "team"
KiLLeR. 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 18:02.


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