Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Jancis_LV on February 08, 2010, 04:01:11 PM

Title: Need some help with strcmp.
Post by: Jancis_LV on February 08, 2010, 04:01:11 PM
kteam = GetPlayerTeam(killerid);
pteam = GetPlayerTeam(playerid);


  if(strcmp(kteam,pteam, true ) == 0 ) {
// Do stuff

}


Where is problem?

error 035: argument type mismatch (argument 1)
Title: Re: Need some help with strcmp.
Post by: Boss on February 08, 2010, 04:08:21 PM
Quote from: Jancis_LV on February 08, 2010, 04:01:11 PM
kteam = GetPlayerTeam(killerid);
pteam = GetPlayerTeam(playerid);


  if(strcmp(kteam,pteam, true ) == 0 ) {
// Do stuff

}


Where is problem?

error 035: argument type mismatch (argument 1)
You are doing it WRONG.

Strcmp is used for string comparison only. To compare two numbers just use if(kteam==pteam){}.
Title: Re: Need some help with strcmp.
Post by: Jancis_LV on February 08, 2010, 06:15:56 PM
Thanks, Boss.