Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Malissha poslato Februar 19, 2019, 21:01:38 POSLE PODNE

Naslov: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 21:01:38 POSLE PODNE
Problem(error/warning): Problem sa Brzinomerom link: https://pastebin.com/kAgkRyEs
Dio skripte: [ pawn ]   /  [ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]   /  [ /code ]
Slika/video imas gore pastebin(brzinomer problem): Pomoć  :'(
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 21:11:18 POSLE PODNE
Pawn Code:
   BRZINOMER[0][playerid] = CreatePlayerTextdraw(playerid,511.199981, 309.866668, "_");
   PlayerTextDrawLetterSize(BRZINOMER[0][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[0][playerid], 93.600006, -1.493347);
   PlayerTextDrawAlignment(BRZINOMER[0][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[0][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[0][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[0][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[0][playerid], 4);

   BRZINOMER[1][playerid] = CreatePlayerTextdraw(playerid,509.599975, 307.626678, "_");
   PlayerTextDrawLetterSize(BRZINOMER[1][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[1][playerid], 1.600006, 59.733306);
   PlayerTextDrawAlignment(BRZINOMER[1][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[1][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[1][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[1][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[1][playerid], 4);

   BRZINOMER[2][playerid] = CreatePlayerTextdraw(playerid,512.000000, 309.866668, "_");
   PlayerTextDrawLetterSize(BRZINOMER[2][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[2][playerid], 92.799987, 56.000000);
   PlayerTextDrawAlignment(BRZINOMER[2][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[2][playerid], 255);
   PlayerTextDrawSetShadow(BRZINOMER[2][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[2][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[2][playerid], 4);

   BRZINOMER[3][playerid] = CreatePlayerTextdraw(playerid,508.800018, 365.866668, "_");
   PlayerTextDrawLetterSize(BRZINOMER[3][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[3][playerid], 95.999969, 0.746673);
   PlayerTextDrawAlignment(BRZINOMER[3][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[3][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[3][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[3][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[3][playerid], 4);

   BRZINOMER[4][playerid] = CreatePlayerTextdraw(playerid,604.000000, 308.373321, "_");
   PlayerTextDrawLetterSize(BRZINOMER[4][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[4][playerid], 0.799987, 58.986663);
   PlayerTextDrawAlignment(BRZINOMER[4][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[4][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[4][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[4][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[4][playerid], 4);

   BRZINOMER[5][playerid] = CreatePlayerTextdraw(playerid,514.400024, 309.866607, "Brzina:0");
   PlayerTextDrawLetterSize(BRZINOMER[5][playerid], 0.329999, 1.487999);
   PlayerTextDrawAlignment(BRZINOMER[5][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[5][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[5][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[5][playerid], 1);
   PlayerTextDrawBackgroundColor(BRZINOMER[5][playerid], 51);
   PlayerTextDrawFont(BRZINOMER[5][playerid], 2);
   PlayerTextDrawSetProportional(BRZINOMER[5][playerid], 1);

   BRZINOMER[6][playerid] = CreatePlayerTextdraw(playerid,510.400024, 335.253326, "_");
   PlayerTextDrawLetterSize(BRZINOMER[6][playerid], 0.000000, 0.000000);
   PlayerTextDrawTextSize(BRZINOMER[6][playerid], 93.599975, 0.746673);
   PlayerTextDrawAlignment(BRZINOMER[6][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[6][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[6][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[6][playerid], 0);
   PlayerTextDrawFont(BRZINOMER[6][playerid], 4);

   BRZINOMER[7][playerid] = CreatePlayerTextdraw(playerid,515.200012, 339.733367, "Gorivo:0L");
   PlayerTextDrawLetterSize(BRZINOMER[7][playerid], 0.281999, 1.376000);
   PlayerTextDrawAlignment(BRZINOMER[7][playerid], 1);
   PlayerTextDrawColor(BRZINOMER[7][playerid], 16711935);
   PlayerTextDrawSetShadow(BRZINOMER[7][playerid], 0);
   PlayerTextDrawSetOutline(BRZINOMER[7][playerid], 1);
   PlayerTextDrawBackgroundColor(BRZINOMER[7][playerid], 51);
   PlayerTextDrawFont(BRZINOMER[7][playerid], 2);
   PlayerTextDrawSetProportional(BRZINOMER[7][playerid], 1);
   return 1;
}
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Legacyy poslato Februar 19, 2019, 21:59:07 POSLE PODNE
Jesi li definisao sve to?
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 22:05:17 POSLE PODNE
jesam
Naslov: Odg: Problem sa Brzinomerom
Poruka od: {Makenzi} poslato Februar 19, 2019, 22:26:10 POSLE PODNE
Array out of bounds, premali ti je index new-a za brzinomer
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Ghetoven poslato Februar 19, 2019, 22:32:37 POSLE PODNE
Racuna se sa 0 od 1 xD komplikovano receno, naci imas 0-7 array tdova u new tamo di ti je za taj td stavis [8] eto cisto laicki (..0-..7=8)
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 22:45:00 POSLE PODNE
mozete pomoci kako da ovo rijesim pola sam rijesio sad imam 6 errora
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(19314) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(24934) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617 -- 25618) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25618) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25618) : fatal error 107: too many error messages on one line

problemi:
PlayerTextDrawSetString(playerid, BRZINOMER[7], string);
-------------------------------------------------------------------------
PlayerTextDrawSetString(playerid, BRZINOMER[7], string);
-------------------------------------------------------------------------
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[0] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[0]
----------------------------------------------------------
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[1] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[1]
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 22:59:33 POSLE PODNE
@Ghetoven moze pomoc  :o
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Ghetoven poslato Februar 19, 2019, 23:01:02 POSLE PODNE
https://wiki.sa-mp.com/wiki/PlayerTextDrawSetString

https://wiki.sa-mp.com/wiki/PlayerTextDrawHide

top bi trebalo da ti pomogne :D
Naslov: Odg: Problem sa Brzinomerom
Poruka od: {Makenzi} poslato Februar 19, 2019, 23:02:38 POSLE PODNE
Saraj brate sa posta, nisu mu ponogao linkovima...
Tebi je brzinomer global td a treba da pude player td i ti formatiras global td f-jom za formatiranje player td-a 😁
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 23:10:10 POSLE PODNE
@Ghetoven

if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[0] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[0]
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[1] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[1]
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[2] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[2]
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[3] else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[3], format(string, sizeof(string), "Gorivo %d", Gorivo[GetPlayerVehicleID(playerid)]), PlayerTextDrawSetString(playerid, BRZINOMER[7], string);
if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[4]

mozes mi ovo slozit mislim sredit to mi samo fali? izvini sto te zamaram.
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 19, 2019, 23:19:10 POSLE PODNE
@{Makenzi}
mozes mi ti pomoc? bas mi treba pomoc  :(
Naslov: Odg: Problem sa Brzinomerom
Poruka od: {Makenzi} poslato Februar 19, 2019, 23:24:31 POSLE PODNE
Nemam vremena jbg a  i mrzi me vise da pomažem ako nemam koristi od toga, samo za novac radim
Naslov: Odg: Problem sa Brzinomerom
Poruka od: .agency poslato Februar 20, 2019, 03:18:14 PRE PODNE
[pawn]new PlayerText:BRZINOMER[8][MAX_PLAYERS];[/pawn]

salji sledece errore
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 20, 2019, 09:06:19 PRE PODNE
@Agency
Errori:
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(15970) : warning 202: number of arguments does not match definition
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(17489) : warning 217: loose indentation
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(19314) : error 017: undefined symbol "i"
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(21323) : warning 217: loose indentation
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(24934) : error 017: undefined symbol "i"
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25616) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25616 -- 25617) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617) : fatal error 107: too many error messages on one line

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

Naslov: Odg: Problem sa Brzinomerom
Poruka od: {Makenzi} poslato Februar 20, 2019, 09:24:19 PRE PODNE
Citat: Malissha Pawno poslato Februar 20, 2019, 09:06:19 PRE PODNE
@Agency
Errori:
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(15970) : warning 202: number of arguments does not match definition
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(17489) : warning 217: loose indentation
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(19314) : error 017: undefined symbol "i"
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(21323) : warning 217: loose indentation
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(24934) : error 017: undefined symbol "i"
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25616) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25616 -- 25617) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617) : error 035: argument type mismatch (argument 2)
C:\Users\win81\Desktop\GAMEMODE\School Project\gamemodes\school project.pwn(25617) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
Jao ko sve danas "skripta", aj neko lock temu @Bašovski nmg da crtam ovom liku da ne treba index pid nego pid index....
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Malissha poslato Februar 20, 2019, 09:39:57 PRE PODNE
rijesio sam ovo "i" pogrijesio sam ja sorry  :D
Naslov: Odg: Problem sa Brzinomerom
Poruka od: .agency poslato Februar 20, 2019, 13:10:24 POSLE PODNE
Citat: {Makenzi} poslato Februar 20, 2019, 09:24:19 PRE PODNE
Jao ko sve danas "skripta", aj neko lock temu @Bašovski nmg da crtam ovom liku da ne treba index pid nego pid index....
Ovo loose indentation ides TAB na return.

15970 salji liniju
Naslov: Odg: Problem sa Brzinomerom
Poruka od: Deken poslato Februar 23, 2019, 07:52:16 PRE PODNE
Citat: {Makenzi} poslato Februar 20, 2019, 09:24:19 PRE PODNE
Jao ko sve danas "skripta", aj neko lock temu @Bašovski nmg da crtam ovom liku da ne treba index pid nego pid index....
Inace lik je pawno