13.08.2015, 16:23
(
Последний раз редактировалось SukMathcuck; 13.08.2015 в 17:59.
)
Hello, can someone help me this error? is a call system, progress bar, most are with mistakes, honestly do not know what to do, can you help me?
Hunger is a system that I'm finishing more errors not let me finish.
I want to learn to use this system, Would anyone tell me what you please listen?
@edit
I think I found the error, what did I do wrong? used the paulor the tutorial samp forum, the more I wanted to put the FomePlayer function, for her that will define where this is going to progress bar, more is very advanced, it is not impossible, more'm studying, someone can tell me how can I do? type, one log out of the server and saved in the player's account to FomePlayer definition, and when he relog back where it was hunger Player, progress bar, please help me?![Sad](images/smilies/sad.gif)
PHP код:
pFomeBarra[1] = TextDrawCreate(578.000000, 157.000000, "_"); //error (2718) : error 022: must be lvalue (non-constant)
TextDrawLetterSize(pFomeBarra[1], 0.490000, 0.499999);
TextDrawUseBox(pFomeBarra[1], 1);
TextDrawBoxColor(pFomeBarra[1], (0x99 | (~0xFF & 0x045FB4FF)));
TextDrawTextSize(pFomeBarra[1], 534.000000, 24.000000);
if (strcmp(cmd, "/comer", true) == 0)
{
if (IsHotDog(playerid))
{
if (IsPlayerInAnyVehicle(playerid)) return 1;
if (GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo possui dinheiro suficiente em mгos.");
if (FomePlayer[playerid] == 100)
{
GivePlayerMoney(playerid, -5);
FomePlayer[playerid] += 30;
GivePlayerHealth(playerid, 1);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 0, 1, 1, 1, 1);
MensagemAcao(playerid, 0, "pega um cachorro-quente.");
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк esta satisfeito e nгo podera comer mais.");
return 1;
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Nгo hб nada para comer neste local.");
return 1;
}
callback::TimerFome(playerid)
{
FomePlayer[playerid]--;
TextDrawTextSize(pFomeBarra[1], (39.0 + ((102.0 * ++FomePlayer) / 100)), 0.0);
TextDrawShowForPlayer(playerid, pFomeBarra[1]);
if (FomePlayer[playerid] >= 1)
{
TempoFome[playerid] = SetTimerEx("TimerFome", 600000, false, "i", playerid);
SendClientMessage(playerid, -1, "<!> Vocк estб ficando fraco e estб ficando com fome!");
RemovePlayerHealth(playerid, 2);
}
else if(FomePlayer[playerid] == 0)
{
SendClientMessage(playerid, -1, "<!> Vocк estб com muita fome e estб passando mal!");
SetPlayerHealth(playerid, 0);
FomePlayer[playerid] = 0;
}
return 1;
}
Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2718) : error 022: must be lvalue (non-constant)
Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2718) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2719) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9467) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9468) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9469) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9470) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9995) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9996) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9997) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9998) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9999) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10001) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10002) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10003) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10004) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10005) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10007) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10008) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10009) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10010) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11948) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11949) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11950) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11958) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11959) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11960) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11961) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54262) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54263) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54264) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54265) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54266) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54267) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54268) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54269) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54270) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
@edit
I think I found the error, what did I do wrong? used the paulor the tutorial samp forum, the more I wanted to put the FomePlayer function, for her that will define where this is going to progress bar, more is very advanced, it is not impossible, more'm studying, someone can tell me how can I do? type, one log out of the server and saved in the player's account to FomePlayer definition, and when he relog back where it was hunger Player, progress bar, please help me?
![Sad](images/smilies/sad.gif)
PHP код:
// Here's decrease hunger player, most do not know where to put FomePlayer function, eg, FomePlayer is set at 50 percent, ie half the progress bar up?
static Float: Progress;
TextDrawTextSize(FomeBarra[1], (39.0 + ((102.0 * ++Progress) / 100)), 0.0);
TextDrawShowForPlayer(playerid, FomeBarra[1]);
// Below is a code, it must only show for the player to progress bar, it should be difinido with FomePlayer
TextDrawTextSize(FomeBarra[1], /*I do not know what I do here*/, 0.0);
TextDrawShowForPlayer(playerid, FomeBarra[1]);