BUG ID 0.

Započeo pokerface, Decembar 03, 2019, 13:31:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):Imam neku mini igru u kojoj u 30 sekundi morate kliknuti na sto vise loptica (slika dolje). Problem je taj što kad igrac ude na server i krene igrati igru on vec ima jednu lopticu a treba biti od nule. I svakoga puta kada pritisnem enter da igram igru i odmah ESC dobijem jednu lopticu a nisam ni igrao igru. Problem je sto se taj BUG događa samo igracu koji je ID 0.
Dio skripte: Ne znam točno koji dio koda da vam dam pa molim za asistenciju.
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/xCCmMcY
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

Ne mogu edit pa da barem dam nešto od koda za početak ako je od pomoći.

Zaboravio sam da napomenem, te loptice se i dalje krecu random za ID 0 ne uniste se.

public OnFilterScriptInit()
{
CreateGamingMachine(0, 2065.0828, -2493.8733, 13.2740, 0.0, 0.0, 0.0);
CreateGamingMachine(0, 2085.0828, -2493.8733, 13.2740, 0.0, 0.0, 0.0);
//and more
    BALL_BOX = TextDrawCreate(167.666717, 87.540718, "box");
TextDrawLetterSize(BALL_BOX, 0.000000, 34.299995);
TextDrawTextSize(BALL_BOX, 476.000000, 0.000000);
TextDrawAlignment(BALL_BOX, 1);
TextDrawColor(BALL_BOX, -1);
TextDrawUseBox(BALL_BOX, 1);
TextDrawBoxColor(BALL_BOX, -5963521);
TextDrawSetShadow(BALL_BOX, 0);
TextDrawBackgroundColor(BALL_BOX, 255);
TextDrawFont(BALL_BOX, 1);
TextDrawSetProportional(BALL_BOX, 1);
BALL_BOX2 = TextDrawCreate(169.333435, 89.614776, "box");
TextDrawLetterSize(BALL_BOX2, 0.000000, 33.920604);
TextDrawTextSize(BALL_BOX2, 474.299926, 0.000000);
TextDrawAlignment(BALL_BOX2, 1);
TextDrawColor(BALL_BOX2, -1);
TextDrawUseBox(BALL_BOX2, 1);
TextDrawBoxColor(BALL_BOX2, 255);
TextDrawSetShadow(BALL_BOX2, 0);
TextDrawBackgroundColor(BALL_BOX2, 255);
TextDrawFont(BALL_BOX2, 1);
TextDrawSetProportional(BALL_BOX2, 1);
foreach(new i : Player)
{
SetPVarInt(i, "IN_BALL", 0);
}
return 1;
}

public OnFilterScriptExit()
{
for(new x = 0; x < MAX_MACHINES; x++)
{
    DestroyGamingMachine(x);
}
TextDrawDestroy(BALL_BOX);
TextDrawDestroy(BALL_BOX2);
foreach(new i : Player)
{
    if(GetPVarInt(i, "IN_BALL") == 1)
    {
    PlayerTextDrawDestroy(i, BALL[i]);
    KillTimer(ball_ptimer[i]);
    KillTimer(ball_end[i]);
CancelSelectTextDraw(i);
SetPVarInt(i, "IN_BALL", 0);
}
}
return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
if(ball_end[playerid] != 0)
{
    ball_in[playerid] = false;
ball_hits[playerid] = 0;
KillTimer(ball_end[playerid]);
ball_end[playerid] = 0;
KillTimer(ball_ptimer[playerid]);
ball_ptimer[playerid] = 0;
PlayerTextDrawDestroy(playerid, BALL[playerid]);
BALL[playerid] = PlayerText:65535;
SetPVarInt(playerid, "IN_BALL", 0);
}
return 1;
}
Poslednja Izmena: Decembar 03, 2019, 13:43:02 POSLE PODNE od Spooky.
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords

Riješio sam problem.
You'll be always in my heart, the end and thanks for amazing times. #WeAreLords