Oko komande !

Započeo BossannaC, Januar 27, 2019, 20:08:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Našao sam cmd na net ali mi samo ove errore izbacuje ne znam da fixam pomoc !

CMD:rtcradius(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][xAdmin] < 1) return SendErrorMessage(playerid, "Niste u mogucnosti koristiti ovu komandu.");
        new radius;
        if(sscanf(params, "i", radius)) return UsageMessage(playerid, "/rtcradius (radius)");
        if(radius < 2 || radius > 50) return SendErrorMessage(playerid, "Ne moze ispod 2 ili iznad 50!");
        GetPlayerPos(playerid, X_C, Y_C, Z_C);
        new sturass[400];
        format(sturass,sizeof(sturass),""col_yellow"Admin %s je respawnovao sva nekoriscena vozila u radiusu od %d metara.", ImeIgraca(playerid),radius);
        AdminPoruka(NARACRVENA, sturass);
        for(new car = 1; car < MAX_VEHICLES; car++)
        {
            if(IsVehicleEmpty(car))
            {
                if(IsCarInRangeOfPoint(car, radius, X_C, Y_C, Z_C))
                {
                    SetVehicleToRespawn(car);
                }
            }
        }
    }
    return true;
}

private IsVehicleEmpty(vehicleid)
{
    foreach(new i : Player)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i, vehicleid)) return false;
        }
    }
    return true;
}


EVO KOJE ERRORE POKAZUJE
[code]C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51405) : error 017: undefined symbol "UsageMessage"
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51407) : error 017: undefined symbol "X_C"
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : error 017: undefined symbol "col_yellow"
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : warning 215: expression has no effect
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : warning 215: expression has no effect
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : error 001: expected token: ";", but found ")"
C:\Users\DarkPC\Desktop\Gamemode\gamemodes\IG.pwn(51409) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.2.3664 Copyright (c) 1997-2016, ITB CompuPhase


6 Errors.
[/code]

Nije ti definisana funkcija "UsageMessage", nisu definisane pozicije X_C, Y_C, Z_C i nije definisana boja "col_yellow"

Citat: Pawno poslato Januar 27, 2019, 21:37:35 POSLE PODNE
Nije ti definisana funkcija "UsageMessage", nisu definisane pozicije X_C, Y_C, Z_C i nije definisana boja "col_yellow"
UssageMessage sam imao slicno u skripti definisano je kao SendUssageMessage, fixao sam to, a kako da definisem to X_C i ostalo a boju mogu change..

[pawn]new Float: X_C, Float: Y_C, Float: Z_C;[/pawn]

Citat: Pawno poslato Januar 27, 2019, 21:41:48 POSLE PODNE
[pawn]new Float: X_C, Float: Y_C, Float: Z_C;[/pawn]
To sam zalijepio tamo, UsageMesage sam stavio kao SendUsageMessage jer je tako definisano u skripti, boju sam stavio koja je definisana i imam ove errore !

C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : warning 215: expression has no effect
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 001: expected token: ";", but found "-string-"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : warning 215: expression has no effect
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : warning 215: expression has no effect
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 001: expected token: ";", but found ")"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.2.3664 Copyright (c) 1997-2016, ITB CompuPhase


4 Errors.


Na ovoj liniji izbacuje sve errore
     format( globalstring, sizeof( globalstring ),""BELA"Admin %s je respawnovao sva nekoriscena vozila u radiusu od %d metara.", ImeIgraca(playerid),radius);
        AdminPoruka(NARACRVENA, sturass);
Poslednja Izmena: Januar 27, 2019, 22:01:33 POSLE PODNE od BossannaC

Probaj umesto "BELA" da stavis {FFFFFF}


Sad sam dobio ove errore izbrisao sam " ispred "BELA" bile su 2 znaka

C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 017: undefined symbol "Admin"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : error 017: undefined symbol "je"
C:\Users\DarkPC\Desktop\Project gamemode\gamemodes\IG.pwn(51542) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.2.3664 Copyright (c) 1997-2016, ITB CompuPhase


4 Errors.

sad ti nisu lepo otvoreni navodnici

Mozes ti uzet gore onu pocetnu i vidit Å¡ta nevalja i meni poslat fixanu ako ti nije problem ?

[pawn][pawn]
CMD:rtcradius(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][xAdmin] < 1) return SendErrorMessage(playerid, "Niste u mogucnosti koristiti ovu komandu.");
        new radius;
        if(sscanf(params, "i", radius)) return UsageMessage(playerid, "/rtcradius (radius)");
        if(radius < 2 || radius > 50) return SendErrorMessage(playerid, "Ne moze ispod 2 ili iznad 50!");
        new Float: X_C, Float: Y_C, Float: Z_C;
        GetPlayerPos(playerid, X_C, Y_C, Z_C);
        new sturass[400];
        format(sturass,sizeof(sturass),"{FFFFFF}Admin %s je respawnovao sva nekoriscena vozila u radiusu od %d metara.", ImeIgraca(playerid),radius);
        AdminPoruka(NARACRVENA, sturass);
        for(new car = 1; car < MAX_VEHICLES; car++)
        {
            if(IsVehicleEmpty(car))
            {
                if(IsCarInRangeOfPoint(car, radius, X_C, Y_C, Z_C))
                {
                    SetVehicleToRespawn(car);
                }
            }
        }
    }
    return true;
}

private IsVehicleEmpty(vehicleid)
{
    foreach(new i : Player)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i, vehicleid)) return false;
        }
    }
    return true;
}
[/pawn][/pawn]

Sad sam dobio 8 errora na različite linije ?