Pomoc oko statsa u texdrawovima

Započeo Milos3311, Februar 29, 2020, 22:23:01 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):Krenuo sam raditi stats u textdrawovovima gledao sam tutorial iz ovoga
https://forum.sa-mp.com/showthread.php?t=287911
i pojavljuju mi se ovi errori
[pawn](4240) : error 017: undefined symbol "rBit1_Get"
(4247) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw0"
(4247) : warning 215: expression has no effect
(4247) : error 001: expected token: ";", but found "]"
(4247) : error 029: invalid expression, assumed zero
(4247) : fatal error 107: too many error messages on one line[/pawn]
Dio skripte:[pawn]public CheckPlayerStatsKeys(playerid)
{
    if(rBit1_Get(StatsShowing, playerid))//4240 linija
    {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if(keys == KEY_SECONDARY_ATTACK)
        {
            TogglePlayerControllable(playerid, 1);
            TextDrawHideForPlayer(playerid,Textdraw0[playerid]);//4247 linija
            TextDrawHideForPlayer(playerid, Textdraw1[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw2[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw3[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw4[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw5[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw6[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw7[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw8[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw9[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw10[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw11[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw12[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw13[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw14[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw15[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw16[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw17[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw18[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw19[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw20[playerid]);
            TextDrawDestroy(Textdraw0[playerid]);
            TextDrawDestroy(Textdraw1[playerid]);
            TextDrawDestroy(Textdraw2[playerid]);
            TextDrawDestroy(Textdraw3[playerid]);
            TextDrawDestroy(Textdraw4[playerid]);
            TextDrawDestroy(Textdraw5[playerid]);
            TextDrawDestroy(Textdraw6[playerid]);
            TextDrawDestroy(Textdraw7[playerid]);
            TextDrawDestroy(Textdraw8[playerid]);
            TextDrawDestroy(Textdraw9[playerid]);
            TextDrawDestroy(Textdraw10[playerid]);
            TextDrawDestroy(Textdraw11[playerid]);
            TextDrawDestroy(Textdraw12[playerid]);
            TextDrawDestroy(Textdraw13[playerid]);
            TextDrawDestroy(Textdraw14[playerid]);
            TextDrawDestroy(Textdraw15[playerid]);
            TextDrawDestroy(Textdraw16[playerid]);
            TextDrawDestroy(Textdraw17[playerid]);
            TextDrawDestroy(Textdraw18[playerid]);
            TextDrawDestroy(Textdraw19[playerid]);
            TextDrawDestroy(Textdraw20[playerid]);
        }
    }
    return 1;
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema(obavezno ako je ingame problem):
Ako neko zna neka pomogne  :'( :'( :'( :'(
Poslednja Izmena: Mart 04, 2020, 22:41:11 POSLE PODNE od Galardo

za ovaj prvi error nemas definisanu varijablu pod tim imenom a posalji kako si define taj td

Mislis na ovo?
[pawn]new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;
new Text:Textdraw7;
new Text:Textdraw8;
new Text:Textdraw9;
new Text:Textdraw10;
new Text:Textdraw11;
new Text:Textdraw12;
new Text:Textdraw13;
new Text:Textdraw14;
new Text:Textdraw15;
new Text:Textdraw16;
new Text:Textdraw17;
new Text:Textdraw18;
new Text:Textdraw19;
new Text:Textdraw20;[/pawn]

A kad definisem ovako ovo
[pawn]new rBit1_Get[MAX_PLAYERS];[/pawn]
pojavluje se ovaj error
[pawn](4241) : error 012: invalid function call, not a valid address
(4241) : warning 215: expression has no effect
(4241) : warning 215: expression has no effect
(4241) : error 001: expected token: ";", but found ")"
(4241) : error 029: invalid expression, assumed zero
(4241) : fatal error 107: too many error messages on one line[/pawn]
ovo je linija 4241
[pawn]public CheckPlayerStatsKeys(playerid)
{
    if(rBit1_Get(StatsShowing, playerid))//4241
    {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if(keys == KEY_SECONDARY_ATTACK)
        {
            TogglePlayerControllable(playerid, 1);
            TextDrawHideForPlayer(playerid,   Textdraw0[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw1[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw2[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw3[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw4[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw5[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw6[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw7[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw8[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw9[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw10[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw11[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw12[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw13[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw14[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw15[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw16[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw17[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw18[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw19[playerid]);
            TextDrawHideForPlayer(playerid, Textdraw20[playerid]);
            TextDrawDestroy(Textdraw0[playerid]);
            TextDrawDestroy(Textdraw1[playerid]);
            TextDrawDestroy(Textdraw2[playerid]);
            TextDrawDestroy(Textdraw3[playerid]);
            TextDrawDestroy(Textdraw4[playerid]);
            TextDrawDestroy(Textdraw5[playerid]);
            TextDrawDestroy(Textdraw6[playerid]);
            TextDrawDestroy(Textdraw7[playerid]);
            TextDrawDestroy(Textdraw8[playerid]);
            TextDrawDestroy(Textdraw9[playerid]);
            TextDrawDestroy(Textdraw10[playerid]);
            TextDrawDestroy(Textdraw11[playerid]);
            TextDrawDestroy(Textdraw12[playerid]);
            TextDrawDestroy(Textdraw13[playerid]);
            TextDrawDestroy(Textdraw14[playerid]);
            TextDrawDestroy(Textdraw15[playerid]);
            TextDrawDestroy(Textdraw16[playerid]);
            TextDrawDestroy(Textdraw17[playerid]);
            TextDrawDestroy(Textdraw18[playerid]);
            TextDrawDestroy(Textdraw19[playerid]);
            TextDrawDestroy(Textdraw20[playerid]);
        }
    }
    return 1;
}[/pawn]

Citat: over poslato Februar 29, 2020, 23:17:18 POSLE PODNE
za ovaj prvi error nemas definisanu varijablu pod tim imenom a posalji kako si define taj td
kolko vidim koristi y_bits :P..
BitArray:....
moja greska, nisam lepo video editovano

Pa ne mozes tako da radis da negde stavljas player negde ne ako u newu stavljas playerid onda ga stavljas svugde isto i obrnuto sve zavisi da li ti je td player ili global i koristi array za tds


Napravi include pomocu ovog
https://pastebin.com/5hr6mfMt
kompajluj include ubaci u pawno/include i u include folder servera


Vrati sve kako je i bilo i dodaj pri vrhu skripte
[pawn]#include rBits_get[/pawn] 
rBits_get promijeni zavisi kako kompajlujes da ti se zove include!



SyS

*

Citat: YumikoJR poslato Februar 29, 2020, 23:36:47 POSLE PODNE
kolko vidim koristi y_bits :P..
BitArray:....
moja greska, nisam lepo video editovano
Odakle ti to da koristi y_bits? :D
Citat: Milos3311 poslato Mart 01, 2020, 09:45:06 PRE PODNE
Pa mozes li mi reci kako da fixam ovo?
https://forum.sa-mp.com/showthread.php?t=275142

Citat: Arkoo poslato Mart 01, 2020, 11:26:24 PRE PODNE
Napravi include pomocu ovog
https://pastebin.com/5hr6mfMt
kompajluj include ubaci u pawno/include i u include folder servera


Vrati sve kako je i bilo i dodaj pri vrhu skripte
[pawn]#include rBits_get[/pawn] 
rBits_get promijeni zavisi kako kompajlujes da ti se zove include!
Al nzm kako opet isto....
Poslednja Izmena: Mart 01, 2020, 12:55:11 POSLE PODNE od Milos3311

Fixao sam ovaj problem hvala svima ali hocu da mi ime bude ispod ovoga a on mi u produzetku stavlja ima evo koda
[pawn]format(tdstring, sizeof(tdstring), "Ime i Prezime: ~w~\n%s",PlayerName(playerid));
   Textdraw6 = CreatePlayerTextDraw(playerid,497.000000, 266.311096,tdstring);
   PlayerTextDrawLetterSize(playerid,Textdraw6, 0.245000, 1.257777);
   PlayerTextDrawAlignment(playerid,Textdraw6, 1);
   PlayerTextDrawColor(playerid,Textdraw6, -1);
   PlayerTextDrawSetShadow(playerid,Textdraw6, 0);
   PlayerTextDrawSetOutline(playerid,Textdraw6, 1);
   PlayerTextDrawBackgroundColor(playerid,Textdraw6, 51);
   PlayerTextDrawFont(playerid,Textdraw6, 1);
   PlayerTextDrawSetProportional(playerid,Textdraw6, 1);[/pawn]

Citat: Milos3311 poslato Mart 01, 2020, 14:13:22 POSLE PODNE
Fixao sam ovaj problem hvala svima ali hocu da mi ime bude ispod ovoga a on mi u produzetku stavlja ima evo koda
[pawn]format(tdstring, sizeof(tdstring), "Ime i Prezime: ~w~\n%s",PlayerName(playerid));
   Textdraw6 = CreatePlayerTextDraw(playerid,497.000000, 266.311096,tdstring);
   PlayerTextDrawLetterSize(playerid,Textdraw6, 0.245000, 1.257777);
   PlayerTextDrawAlignment(playerid,Textdraw6, 1);
   PlayerTextDrawColor(playerid,Textdraw6, -1);
   PlayerTextDrawSetShadow(playerid,Textdraw6, 0);
   PlayerTextDrawSetOutline(playerid,Textdraw6, 1);
   PlayerTextDrawBackgroundColor(playerid,Textdraw6, 51);
   PlayerTextDrawFont(playerid,Textdraw6, 1);
   PlayerTextDrawSetProportional(playerid,Textdraw6, 1);[/pawn]
Ako sam dobro skontao hoces da ispod Ime i Prezime da ispise ime i prezime igraca, za to ide umjesto \n stavi ~n~, ako ne ide tako onda napravi dodatno TD

Citat: Arkoo poslato Mart 01, 2020, 14:18:09 POSLE PODNE
Ako sam dobro skontao hoces da ispod Ime i Prezime da ispise ime i prezime igraca, za to ide umjesto \n stavi ~n~, ako ne ide tako onda napravi dodatno TD
To je to hvala vam svima ;D ;D