Need help!
#1

PHP код:
CMD:fixcar(playeridparams[])
{
    if(
jobVariables[playerVariables[playerid][pJob]][jJobType] == || playerVariables[playerid][pAdminDuty] >= 1)
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            new
                
vehString[72],
                
FloatsoPos[3],
                
vehicleID GetPlayerVehicleID(playerid);
            if(
playerVariables[playerid][pJobDelay] == 0)
            { 
// DELAY!1
                
if(GetPlayerSpeed(playerid0) == 0)//here is the error
                
{
                    
GetVehiclePos(vehicleIDsoPos[0], soPos[1], soPos[2]);
                    
PlayerPlaySoundEx(1133soPos[0], soPos[1], soPos[2]);
                    
RepairVehicle(vehicleID);
                    
format(vehStringsizeof(vehString), "You have repaired your %s."VehicleNames[GetVehicleModel(vehicleID) - 400]);
                    
SendClientMessage(playeridCOLOR_WHITEvehString);
                    
playerVariables[playerid][pJobDelay] = 60;
                }
                else 
SendClientMessage(playeridCOLOR_WHITE"You must stop your vehicle first.");
            }
            else
            {
                
format(vehStringsizeof(vehString), "You need to wait %d seconds until you can use a mechanic command again.",playerVariables[playerid][pJobDelay]);
                
SendClientMessage(playeridCOLOR_GREYvehString);
            }
        }
    }
    return 
1;

PHP код:
CMD:colourcar(playeridparams[]) {
    if(
jobVariables[playerVariables[playerid][pJob]][jJobType] == 3) {
        new
            
colors[2],
            
FloatsoPos[3],
            
vehicleID GetPlayerVehicleID(playerid);
        if(
sscanf(params"dd"colors[0], colors[1])) {
            return 
SendClientMessage(playeridCOLOR_GREYSYNTAX_MESSAGE"/colourcar [colour 1] [colour 2]");
        }
        else if(
vehicleID) {
            if(
playerVariables[playerid][pJobDelay] == 0){ // DELAY!1
                
if(GetPlayerSpeed(playerid0) == 0){//here
                    
if(colors[0] >= && colors[0] < 256 && colors[1] >= && colors[1] < 256) {
                        
GetVehiclePos(vehicleIDsoPos[0], soPos[1], soPos[2]);
                        
PlayerPlaySoundEx(1134soPos[0], soPos[1], soPos[2]);
                        
ChangeVehicleColor(vehicleIDcolors[0], colors[1]);
                        foreach(
Playerv) {
                            if(
playerVariables[v][pCarID] == vehicleID) {
                                
playerVariables[v][pCarColour][0] = colors[0];
                                
playerVariables[v][pCarColour][1] = colors[1];
                            }
                        }
                        
SendClientMessage(playeridCOLOR_WHITE"You have resprayed your vehicle.");
                        
playerVariables[playerid][pJobDelay] = 60;
                    }
                    else 
SendClientMessage(playeridCOLOR_WHITE"Valid vehicle colours are 0 to 255.");
                }
                else 
SendClientMessage(playeridCOLOR_WHITE"You must stop your vehicle first.");
            }
            else 
SendClientMessage(playeridCOLOR_WHITE"Please wait your job reload time.");
        }
    }
    return 
1;

Error is:
Quote:

warning 213: tag mismatch

Quote:

warning 213: tag mismatch

Please help me out (if you will ask I will give you rep) But please help me out with this, something isn't just working properly..

Regrads Scrillex!
Reply
#2

if(GetPlayerSpeed(playerid, 0) == 0)

is obviously

if(GetPlayerSpeed(playerid) == 0)
Reply
#3

Show are the lines were its show you the warnings !
Reply
#4

if(GetPlayerSpeed(playerid, 0) == 0){//here
if(GetPlayerSpeed(playerid, 0) == 0)//here is the error

Thanks for fast response
Reply
#5

Quote:

if(GetPlayerSpeed(playerid, 0) == 0)

is obviously

if(GetPlayerSpeed(playerid) == 0)

that isnt that one so.... There isn't a prob...


Sorry for double post!
Reply
#6

give me the stock/public for GetPlayerSpeed ?


EDIT:-

if your stock is something similar to
PHP код:
stock GetPlayerSpeed(playeridFloat:Speed
then you should replace if(GetPlayerSpeed... with following lines :

PHP код:
new Float:plSpeed;
GetPlayerSpeed(playeridplSpeed);
if(
plSpeed == 0// continue code.. 
Reply
#7

Thanks yeah there was problem now it's solved Big thanks mate GetPlayerSpeed stock was a little wrong.. thanks for your time + rep!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)