Vehicle repair and variables
#1

pawn Код:
if(!strcmp(cmdtext, "/vr", true, 3))
    {
        if(IsPlayerInAnyVehicle(playerid));
        {
            string4 = GetPlayerVehicleID(playerid);
            RepairVehicle(string4);
            SendClientMessage(playerid, COLOR_GREEN, "Vehicle fixed.");
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
        }
        return 1;
    }
This is the script.
And the errors are:
Код:
C:\Documents and Settings\Janar\Desktop\SAMP\gamemodes\minu2.pwn(550) : error 036: empty statement
C:\Documents and Settings\Janar\Desktop\SAMP\gamemodes\minu2.pwn(556) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
What have I done wrong?

I had same thing on another script, that I tried, but I got fixed somehow.
_________________________________________________
I also have question. How to get variable from command? It is still too confusing for me.
Reply
#2

Here:

pawn Код:
if(IsPlayerInAnyVehicle(playerid));
You don't need the

pawn Код:
;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)