30/10/2023 16:58
(30/10/2023 16:50)pushline Escreveu: Lol, esqueci de arrumar o format nos dois SendClientMessages(s).
agora nos format é so fazer assim:
Código PHP:format(stringSCM, sizeof(stringSCM), "{FFFFFF}Fome: %0.2f", Fome[playerid]);
SendClientMessage(playerid, 0xFFFF00, stringSCM);
nika: Aqui está, o erro pesiste agora mostrei todos os componentes usado no codigo!
C:\Users\yTzkaii\Desktop\Brasil_Flexe_Roleplay\gamemodes\bfrp.pwn(132) : error 029: invalid expression, assumed zero
C:\Users\yTzkaii\Desktop\Brasil_Flexe_Roleplay\gamemodes\bfrp.pwn(132) : error 035: argument type mismatch (argument 1)
C:\Users\yTzkaii\Desktop\Brasil_Flexe_Roleplay\gamemodes\bfrp.pwn(132) : error 029: invalid expression, assumed zero
C:\Users\yTzkaii\Desktop\Brasil_Flexe_Roleplay\gamemodes\bfrp.pwn(132) : fatal error 107: too many error messages on one line
Compilation aborted.
Pawn compiler 3.2.3664 Copyright © 1997-2016, ITB CompuPhase
4 Errors.
=============================================
[font=Consolas, "Courier New", monospace]forward UpdateStatusBars(playerid);
public UpdateStatusBars(playerid)
{
// Atualize os indicadores para o jogador
new stringSCM[128];
SendClientMessage(playerid, 0xFFFF00, "{FFFFFF}=== Seu status ===");
format(stringSCM, sizeof(stringSCM), "{FFFFFF}Fome: %0.2f", Fome[playerid]);
SendClientMessage(playerid, 0xFFFF00, stringSCM);
format(stringSCM, sizeof(stringSCM), "{FFFFFF}Sede: %0.2f", Sede[playerid]);
SendClientMessage(playerid, 0xFFFF00, stringSCM, = (format(playerid, "%0.2f", Sede)));
format(stringSCM, sizeof(stringSCM), "{FFFFFF}Sono: %0.2f", Sono[playerid]);
SendClientMessage(playerid, 0xFFFF00, stringSCM, = (format(playerid, "%0.2f", Sono)));
return 1;
}[/font]
==================================================
[font=Consolas, "Courier New", monospace]public OnPlayerConnect(playerid)
{
// Defina os niveis iniciais de fome, sede e sono
playerFome[playerid] = 100.0;
playerSede[playerid] = 100.0;
playerSono[playerid] = 0.0;
// Atualize os indicadores de fome, sede e sono para o jogador
UpdateStatusBars(playerid);
return 1;
}[/font]
=====================================================
[font=Consolas, "Courier New", monospace]new Float: playerFome[MAX_PLAYERS];
new Float: playerSede[MAX_PLAYERS];
new Float: playerSono[MAX_PLAYERS];
new Float: Fome[MAX_PLAYERS];
new Float: Sede[MAX_PLAYERS];
new Float: Sono[MAX_PLAYERS];[/font]