Vice City Multiplayer

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

Title: Need some help with strcmp.
Post by: Jancis_LV on February 08, 2010, 06:01:11 pm
Code: [Select]
kteam = GetPlayerTeam(killerid);
pteam = GetPlayerTeam(playerid);

Code: [Select]
  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, 06:08:21 pm
Code: [Select]
kteam = GetPlayerTeam(killerid);
pteam = GetPlayerTeam(playerid);

Code: [Select]
  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, 08:15:56 pm
Thanks, Boss.