script cmd compile error help
#1

I get 5 erros while trying to add this cmd to avs car script[if it possible]
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1322) : error 017: undefined symbol "MAX_PLAYERVEHICLES"
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1324) : error 017: undefined symbol "PlayerVehicleInfo"
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1324) : warning 215: expression has no effect
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1324) : error 001: expected token: ";", but found "]"
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1324) : error 029: invalid expression, assumed zero
D:\GTA San Andreas\Test Sever\filterscripts\avs.pwn(1324) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.


Код HTML:
CMD:mycars(playerid)
{
    SendClientMessage(playerid, COLOR_WHITE, "|___Your vehicles:___|");
    new string[60];
    for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
    {
         if(PlayerVehicleInfo[playerid][v][pvModelId])
            {
            format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars"));
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
    }
    format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars");
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
}
please help ty=]
Reply
#2

I don't really recommend this type of scripting where you have no clue what you are actually doing and just copy paste stuff which it seems you did, the problem you have is quite easy to fix but requires some knowledge of how the different things in PAWN works such as loops, defines, enums and such, I suggest if you plan on continuing to script that you start approaching in a new way which is by reading tutorials and writing the code yourself as it will give you such a huge advantage when dealing with errors and bugs.

Anyways to fix this command you either have to copy more stuff from the script you copied that command from or replace the different variables with the ones you use if you use any.
Reply
#3

i want to add this cmd to another script if it possible just dont know how.
this is the script i want to add this command,http://pastebin.com/GM2Pwe7K
i dont really know how to write it correctly the defines/enums-
thats why asked for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)