SA-MP Forums Archive
Vehicle repair and variables - 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: Vehicle repair and variables (/showthread.php?tid=144109)



Vehicle repair and variables - newarvuti - 25.04.2010

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.


Re: Vehicle repair and variables - russo666 - 25.04.2010

Here:

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

pawn Код:
;