warning 202: number of arguments does not match definition
#1

Here's the error message i get.
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(62) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(63) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(64) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(65) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(67) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(6 : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(69) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(70) : warning 202: number of arguments does not match definition
C:\Users\fysical\Desktop\samp03bsvr_R2_win32\gamem odes\JimmysDeathMatch.pwn(71) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Warnings.



Here's the script. The wierd part is the SOA vehicles and the First LSPD cruiser is working but not the other ones :S
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#if defined FILTERSCRIPT

#define COLOR_RED 0xFF0000AA
#define SOA 1
#define LSPD 2
#define YAKUZA 3
#define SOA_COLOUR 0x00820FAA
#define LSPD_COLOUR 0x003DF5AA
#define YAKUZA_COLOUR 0x00820FAA
//kod som gцr sе att bara polis kan gе in i polisbil o soa bara kan gе i soa bike.
enum TeamCars
{
    Soa,
    Lspd,
    Yakuza,
}

new Cars[TeamCars];
new gTeam[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Jimmy Karlsson");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" JimmysDeathmatch");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    //Hдr lдgger man till nya skins.
    // Don't use these lines if it's a filterscript
    //SOA BIKES
    Cars[Soa] = CreateVehicle(463,694.8014,-474.0371,15.8537,90.5883,25,1,120); //Bikes
    Cars[Soa] = CreateVehicle(463,694.6365,-472.5578,15.8562,91.6353,32,1,120); //Bikes
    Cars[Soa] = CreateVehicle(463,694.5961,-470.9783,15.8557,88.3544,122,1,120); //Bikes
    Cars[Soa] = CreateVehicle(586,694.7456,-469.3488,15.8561,90.8062,10,1,120); //Bikes
    Cars[Soa] = CreateVehicle(586,694.7992,-467.5677,15.8553,87.6643,25,1,120); //Bikes
    //LSPD CAR
    Cars[Lspd] = CreateVehicle(597,1557.6084,-1607.4335,13.1503,3.6478,0,1,120); //LSPD Cruiser
    Cars[Lspd] = CreateVehicle(597,1564.9447,-1607.3932,13.0625,359.6185,14,14); //LSPD Cruiser
    Cars[Lspd] = CreateVehicle(597,1568.3103,-1607.7032,13.0625,356.2744,1,2); //LSPD Cruiser
    Cars[Lspd] = CreateVehicle(597,1570.7894,-1607.3202,13.0625,354.9536,1,2); //LSPD Cruiser
    Cars[Lspd] = CreateVehicle(597,1561.3356,-1607.3861,13.0625,1.1507,13,13); //LSPD Cruiser
	//YAKUZA CARS
 	Cars[Yakuza] = CreateVehicle(507,1426.4475,-1845.0795,13.2266,177.4030,1,2); //YAKUZA
 	Cars[Yakuza] = CreateVehicle(507,1429.7230,-1843.8636,13.2265,181.3088,1,2); //YAKUZA
 	Cars[Yakuza] = CreateVehicle(507,1433.1179,-1843.7711,13.2266,180.6727,10,10); //YAKUZA
 	Cars[Yakuza] = CreateVehicle(507,1436.1298,-1843.8865,13.2265,181.3362,13,13); //YAKUZA
 	Cars[Yakuza] = CreateVehicle(507,1439.4425,-1844.0258,13.2265,181.2743,14,14); //YAKUZA
	
    SetGameModeText("JimmysDeathmatch");
    //SOA
    AddPlayerClass(247, 1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    AddPlayerClass(248,1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    //LSPD
    AddPlayerClass(280, 1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    AddPlayerClass(281,1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    //YAKUZA
    AddPlayerClass(117,1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    AddPlayerClass(118,1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    AddPlayerClass(120,1545.7916,-1675.6432,13.5611,92.1874,0,0,0,0,0,0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}
//Hдr har jag gjt sе att positionen дr vid polisstation
//Camerapositionen tittar pе skinnens
//Cameralookat tittar pе skinnens
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid); //gцr sе classen дndras till ett team!
    GivePlayerMoney(playerid, 15000); //han fеr 15000kr nдr han spawnar
    SetPlayerPos(playerid, 1483.5361,-1713.5564,14.0469);
    SetPlayerFacingAngle(playerid, 181.8816);
    SetPlayerCameraPos(playerid, 1483.4851,-1704.9474,14.0469);
    SetPlayerCameraLookAt(playerid, 1483.5361,-1713.5564,14.0469);
    return 1;
}
//Allt detta sker nдr nеgon connectar
public OnPlayerConnect(playerid)
{
    new string[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));//denna koden sдger till scriptet att ta personen som connectars player name =)
    format(string, sizeof(string), "Welcome to the server %s fore tutorials and stuff visit http://random.com",playername);
    SendClientMessage(playerid,0xAA3333AA,string); //Stringen gцr sе det i stringen цver
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid); //Nдr dom vдljer skin sе ska rдtt nametag o color vдljas det lцser den hдr.
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    SendClientMessage(killerid,0xAA3333AA,"You murdered a man, and also stole his wallet with 500$ in it, hope no one saw you!");//Om du mцrdar nеgon fеr du detta meddelandet
    GivePlayerMoney(killerid, 500); //om man mцrdar nеgon fеr man 500$ (du rеnar han RP int ekommit sе lеngt дn ;) )
    SendClientMessage(playerid,0xAA3333AA,"You were murdered and robbed for 500$, watch out next time!"); //om du blir mцrdad fеr du detta meddelandet
    GivePlayerMoney(playerid, -500);//om man dцr fцrlorar man 600
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}
//Hдr gцr jag kommands man kan anvдnda i spelet
public OnPlayerCommandText(playerid, cmdtext[])
{

    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 0);
        return 1;
    }
    if (strcmp("/buymp5", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid, 29,200);
        GivePlayerMoney(playerid, -15000); //om du skriver /buymp5 sе "kцper" du en mp5 med 200 skott fцr 15000
        return 1;
    }
    if (strcmp("/teleportspawn", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1545.3984,-1675.6747,13.5603); //X, Y, Z
        return 1;
    }
    if (strcmp("/helpme", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xAA3333AA,"For all the commands/jobs/location etc go to http://random.com");
        return 1;
    }
    if (strcmp("/teleport1", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 2442.7378,-1279.5771,24.0000); //X, Y, Z
        return 1;
    }
    //denna koden under gцr sе att jag kan spawna en bil, lite mera kompliserat
    if(strcmp("/admincar", cmdtext, true, 5) == 0){
        new Float:x, Float:y, Float:z, Float:az;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, az);
        CreateVehicle(429, x+5, y+5, z, az, -1, -1, 180);
        return 1;
}
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 3) //VIKTIGT OM MAN LДGGER TILL ETT TEAM! ДNDRA TE 4,5,6 OSV!!
    {
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == Cars[Soa] )
        {
            if(gTeam[playerid] != 1)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
                return 1;
            }
        }
        if(CarCheck == Cars[Lspd] )
        {
            if(gTeam[playerid] != 2)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
                return 1;
            }
        }
        if(CarCheck == Cars[Yakuza] )
        {
            if(gTeam[playerid] != 3)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
                return 1;
            }
        }
        return 1;
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = SOA;
    }
    if(classid == 1)
    {
        gTeam[playerid] = LSPD;
    }
    if(classid == 2)
    {
        gTeam[playerid] = YAKUZA;
    }
	
}

SetPlayerToTeamColor(playerid)
{
    if(gTeam[playerid] == SOA)
    {
        SetPlayerColor(playerid,SOA_COLOUR); //Green
    }
    if(gTeam[playerid] == LSPD)
    {
        SetPlayerColor(playerid,LSPD_COLOUR); // Blue
    }
    if(gTeam[playerid] == YAKUZA)
    {
        SetPlayerColor(playerid,YAKUZA_COLOUR); // Blue
    }

}
Reply
#2

Why you don't just show us the lines instead of posting the hole code without saying were?
Reply
#3

just count all the "," in the line's and youll find the anwser
Reply
#4

CreateVehicle has a respawn delay param (in seconds), you forgot that hence the warning

CreateVehicle(597,1564.9447,-1607.3932,13.0625,359.6185,14,14); //LSPD Cruiser

Your other CreateVehicle lines are ok. Pretty sure you coulda fixed that if you bothered to look :/
Reply
#5

And
Код:
enum TeamCars
{
    Soa,
    Lspd,
    Yakuza,
}
To.

Код:
enum TeamCars
{
    Soa,
    Lspd,
    Yakuza
};
Reply
#6

Thank you for the help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)