[HELP] tag mismatch
#1

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    new 
pname[MAX_PLAYER_NAME];
    
    
GetPlayerName(playeridpnamesizeof pname);
    
    if(
newstate == PLAYER_STATE_DRIVER)
    {
        if(
vehicleid == vehicle)
        {
            new    
mpp;
            new 
carsid mpp;
            if(
strcmp(pname"%d"carsidtrue) == 0)
              {
                return 
1;
            }
            else
              {
              
RemovePlayerFromVehicle(playerid);
            new 
string[50];
            
format(stringsizeof(string), "~r~This car is private!");
            
GameTextForPlayer(playeridstring30004);
            }
        }
}
    return 
1;

Error when compiling:

Quote:

C:\Users\mega\Desktop\1\gamemodes\grandlarc.pwn(65 5) : warning 213: tag mismatch

Problem is in this line:
PHP код:
if(strcmp(pname"%d"carsidtrue) == 0
Reply
#2

What the fuck is it supposed to do? Check if player's name is equal to the vehicle ID?
Reply
#3

What are you trying to do?
Reply
#4

I want to make a car key.
EXP /givekey [playerid]
Reply
#5

if(strcmp(pname,carsid, true) == 0)
https://sampwiki.blast.hk/wiki/Strcmp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)