• Welcome to Vice City Multiplayer.
 

Need some help with strcmp.

Started by Jancis_LV, February 08, 2010, 03:01:11 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Jancis_LV

kteam = GetPlayerTeam(killerid);
pteam = GetPlayerTeam(playerid);


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

}


Where is problem?

error 035: argument type mismatch (argument 1)
Latvian Vice City server
78.84.47.75:5192

Boss

Quote from: Jancis_LV on February 08, 2010, 03: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){}.

Jancis_LV

Latvian Vice City server
78.84.47.75:5192