Pomoc

Započeo Marko_Menteljev, Avgust 23, 2022, 19:38:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pitanje/savjet: Kako mogu rijesi ti ove erore i na mom kucnom serveru sati rade normalo a dok na hostu kasne da li je moguce ih nekako podesi ti. sila te linije: https://ibb.co/W0cwbZN
Opširnije: evo ti erori sto izlaze [pawn]C:\Users\in\Desktop\osa\gamemodes\nestor.pwn(40399) : error 012: invalid function call, not a valid address
C:\Users\in\Desktop\osa\gamemodes\nestor.pwn(40399) : warning 215: expression has no effect
C:\Users\in\Desktop\osa\gamemodes\nestor.pwn(40399) : error 001: expected token: ";", but found ")"
C:\Users\in\Desktop\osa\gamemodes\nestor.pwn(40399) : error 029: invalid expression, assumed zero
C:\Users\in\Desktop\osa\gamemodes\nestor.pwn(40399) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[/pawn]
Dodatno: moze mi neko pomoci da ovo fixam radio sam ubacivanje vozila za org izvor skripte Ghetto 1.7
Poslednja Izmena: Avgust 23, 2022, 19:41:34 POSLE PODNE od Marko_Menteljev

Uporedi funkciju CFAuta sa na primer ZKAuta i vidi sta si omanuo.

Sto se tice vremena, mozes manuelno u kodu da povecas/smanjis sate

[pawn]new sati,minuti;
gettime(sati, minuti);
sati += 2;[/pawn]

isto je samo nije isto id org
[pawn]if(ZKAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 2)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~w~The Escobar Cartel!", 2500, 5);
         }
      }
         if(CFAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 11)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~w~Surcinski Kartel!", 2500, 5);
         }
      }[/pawn]

Tu si pozvao funkciju, daj nam kod same funkcije

Hvala nasao sam gresku i popravio sam je.

a to za sate gdje trebam otici da ih podesim.

Citat: Marko_Menteljev poslato Avgust 23, 2022, 21:27:10 POSLE PODNE
a to za sate gdje trebam otici da ih podesim.


Onde gde ih koristis, mozes da napravis neku pomocnu funkciju, koja ce na primer uzimati sate, minute i sekunde, povecati sate za na primer 2 i vratiti isto to

Mozes mi ti to napravi ti ja to nez ako ti nije problem ovo je sadasnja skripta za sate znaci na kucnom tacan je ali ha hostu sat kasni 5h.
[pawn]forward VremeTimer(playerid);
public VremeTimer(playerid)
{
   new string[128],godina,mjesec,dan,sati,minute,sekunde;
    getdate(godina, mjesec, dan), gettime(sati, minute, sekunde);
    format(string, sizeof string, "%d.%s%d.%s%d", dan, ((mjesec < 10) ? ("0") : ("")), mjesec, (godina < 10) ? ("0") : (""), godina);
    TextDrawSetString(Datum, string);
    format(string, sizeof string, "%s%d:%s%d", (sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute, (sekunde < 10) ? ("0") : (""), sekunde);
   TextDrawSetString(Vreme, string);
}[/pawn]

[pawn]#define gettimeEx(%0,%1,%2) gettime(%0,%1,%2); %0 += 5[/pawn]

Ovo dodas negde pri pocetku skripte, i svuda u skripti gde koristis gettime zamenis sa gettimeEx

Zamenio sam ali sam dobio par errora
[pawn]C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(24654) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34004) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34012) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34022) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34039) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34049) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34063) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34224) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35637) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35639) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35665) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35667) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(37025) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(37093) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(70162) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

[/pawn]
evo te prve crte [pawn]new time = gettimeEx();[/pawn]

Mozda si zamenio u define-u takodje?

Sto se koriscenja tice :

[pawn]new hour, minute, second;
gettimeEx(hour, minute, second);[/pawn]

 ubacio sam i to ali evo nivih errora
[pawn]C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(595) : error 021: symbol already defined: "gettime"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(24656) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34006) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34014) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34024) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34041) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34051) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34065) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(34226) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35639) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35641) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35667) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(35669) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(37027) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(37095) : error 017: undefined symbol "gettimeEx"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(70164) : warning 203: symbol is never used: "string"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(72540) : warning 219: local variable "minute" shadows a variable at a preceding level
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(75571) : warning 203: symbol is never used: "hour"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(75571) : warning 203: symbol is never used: "minute"
C:\Users\in\Desktop\osa - Copy (5)\gamemodes\nestor.pwn(75571) : warning 203: symbol is never used: "second"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase[/pawn]


595[pawn]        gettimeEx(hour, minute, second);[/pawn]
24656[pawn]    new time = gettimeEx(); [/pawn]
34006[pawn]    if(gettimeEx() < NewNew[playerid]) return SCM(playerid, -1, ""CRVENA"INFO | "SIVA"Ovu komandu mozete koristiti svakih 30 sekundi!");[/pawn]
34014[pawn]      NewNew[playerid] = gettimeEx() + 30;[/pawn]
34024[pawn]if(gettimeEx() < hPomoc[playerid]) return SCAM(playerid,-1, ""PLAVA"(NS:RP) "SIVA"Ovu komandu mozete koristiti svakih 40 sekundi!");[/pawn]

Posalji gettimeEx funkciju... Pre toga pretrazi da li postoji jos negde ta funkcija, ako da obrisi je...

Neaktivna tema... Lock...