-
Hiba:
(3585) : warning 219: local variable \"playerid\" shadows a variable at a preceding level
(3585) : error 017: undefined symbol \"YSI_gSJatekosok\"
(3585) : error 017: undefined symbol \"YSI_gAJatekosok\"
(3585) : warning 215: expression has no effect
(3585) : error 001: expected token: \";\", but found \"]\"
(3585) : fatal error 107: too many error messages on one line
3585 sor:
foreach(Jatekosok,playerid)
-
kimaradt egy ;
foreach(Jatekosok,playerid);
-
Ugyan azok a warningok
-
Másold be azt a részt amire kidobja.
-
forward SyncUp();
public SyncUp()
{
foreach(Jatekosok,playerid);
{
if(!IsPlayerConnected(playerid) || !Logged(playerid) || IsPlayerNPC(playerid)) continue;
if( PlayerData[ playerid ][ Almossag ] <= 100.0 )
PlayerData[ playerid ][ Almossag ] += 0.1;
if( PlayerData[ playerid ][ Almossag ] >= 90.0 )
{
SetPlayerDrunkLevel(playerid, 50000);
if( PlayerData[ playerid ][ Almossag ] == 92.0 || PlayerData[ playerid ][ Almossag ] == 94.0 || PlayerData[ playerid ][ Almossag ] == 96.0)
SendClientMessage( playerid, 0xFFFF00AA, \"Nagyon álmos vagy! Menj aludni!\");
}
}
return 1;
}
-
foreach(playerid,Jatekosok);
-
Ugyan az.
-
forward SyncUp(playerid);
public SyncUp(playerid)
{
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(playerid) || !Logged(playerid) || IsPlayerNPC(playerid)) continue;
if( PlayerData[ playerid ][ Almossag ] <= 100.0 )
PlayerData[ playerid ][ Almossag ] += 0.1;
if( PlayerData[ playerid ][ Almossag ] >= 90.0 )
{
SetPlayerDrunkLevel(playerid, 50000);
if( PlayerData[ playerid ][ Almossag ] == 92.0 || PlayerData[ playerid ][ Almossag ] == 94.0 || PlayerData[ playerid ][ Almossag ] == 96.0)
SendClientMessage( playerid, 0xFFFF00AA, \"Nagyon álmos vagy! Menj aludni!\");
}
}
return 1;
}
-
Sikerült! Köszi :)
-
[mod]A témát zártam, mert ennek van kiemelt téma is, amúgy is már megoldódott.[/mod]