SA-MP Forums Archive
[HELP] tag mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] tag mismatch (/showthread.php?tid=271447)



[HELP] tag mismatch - agreathon - 24.07.2011

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



Re: [HELP] tag mismatch - Finn - 24.07.2011

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


Re: [HELP] tag mismatch - MadeMan - 24.07.2011

What are you trying to do?


Re: [HELP] tag mismatch - agreathon - 24.07.2011

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


Re: [HELP] tag mismatch - =WoR=Varth - 25.07.2011

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