[Help] Weird problem with string ID 1
#1

So. Never seen this kinda shit.

ID 1 is never reading good ID from %d.
ID 0 and 2 works fine as shown in pictures.
Код:
format(recon_string, sizeof(recon_string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d~n~~g~%.1f hp",PlayerName(ReconanID[i]), ReconanID[i], zdravlje);
GameTextForPlayer(i, recon_string, 3500, 3);
Pictures - https://imgur.com/a/4Qm8z

Last version of sscanf, and everything is updated, everything works fine for ID 1 only this is bugged. Why the F...
Reply
#2

Without codes, it's very hard to help you.
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Without codes, it's very hard to help you.
It's on timer and it's refreshing every 3 second.

Код:
new recon_string[128],Float:zdravlje;
				SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(ReconanID[i]));
				SetPlayerInterior(i,GetPlayerInterior(ReconanID[i]));
				GetPlayerHealth(ReconanID[i],zdravlje);
				if(IsPlayerInAnyVehicle(ReconanID[i]))
				{
				    PlayerSpectateVehicle(i, GetPlayerVehicleID(ReconanID[i]));
				    format(recon_string, sizeof(recon_string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d~n~~g~%.1f hp~n~~r~%d km/h",PlayerName(ReconanID[i]), ReconanID[i], zdravlje, IgracevaBrzina(ReconanID[i]));
				    GameTextForPlayer(i, recon_string, 3500, 3);
				}
				else
				{
				    PlayerSpectatePlayer(i, ReconanID[i]);
				    format(recon_string, sizeof(recon_string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d~n~~g~%.1f hp",PlayerName(ReconanID[i]), ReconanID[i], zdravlje);
				    GameTextForPlayer(i, recon_string, 3500, 3);
				}
Im telling you, every other ID work's fine, only ID 1 is causing that strange bug with text and not reading ID... %d
Reply
#4

Quote:
Originally Posted by David (Sabljak)
Посмотреть сообщение
It's on timer and it's refreshing every 3 second.

Код:
new recon_string[128],Float:zdravlje;
				SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(ReconanID[i]));
				SetPlayerInterior(i,GetPlayerInterior(ReconanID[i]));
				GetPlayerHealth(ReconanID[i],zdravlje);
				if(IsPlayerInAnyVehicle(ReconanID[i]))
				{
				    PlayerSpectateVehicle(i, GetPlayerVehicleID(ReconanID[i]));
				    format(recon_string, sizeof(recon_string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d~n~~g~%.1f hp~n~~r~%d km/h",PlayerName(ReconanID[i]), ReconanID[i], zdravlje, IgracevaBrzina(ReconanID[i]));
				    GameTextForPlayer(i, recon_string, 3500, 3);
				}
				else
				{
				    PlayerSpectatePlayer(i, ReconanID[i]);
				    format(recon_string, sizeof(recon_string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d~n~~g~%.1f hp",PlayerName(ReconanID[i]), ReconanID[i], zdravlje);
				    GameTextForPlayer(i, recon_string, 3500, 3);
				}
Im telling you, every other ID work's fine, only ID 1 is causing that strange bug with text and not reading ID... %d
I encountered exactly the same bug and nothing to fix it.
PHP код:
format(stringsizeof(string), "~n~~n~~n~~n~~n~~g~%i~w~-~r~%i"trainingSucces[playerid], trainingMissed[playerid]); 
Reply
#5

Really? Only on ID 1? ..who can help us?
Reply
#6

anyone? bump? ... when i do outside of that timer it works normal...

Код:
CMD:recontest(playerid, params[])
{
	new id,string[128];
    if(sscanf(params, "u", id)) return Use(playerid,"/recontest [ID]");
	if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return WrongID(playerid);
	format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~w~%s ~y~ID: ~w~%d",PlayerName(id), id);
	GameTextForPlayer(playerid, string, 4500, 3);
    return 1;
}
Reply
#7

debug ReconanID[i] and try to figure out what params it have.
also does this PlayerSpectateVehicle(i, GetPlayerVehicleID(ReconanID[i])); <-- work for ID 0?
Reply
#8

Using ReconanID[playerid] = id; to define what ID you spectating...

It works for every ID expect ID 1, i mean, only the bug with ID string ...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)