C:\Users\Callum.Acer\Desktop\South Central RP\gamemodes\roleplay.pwn(14493) : warning 217: loose indentation C:\Users\Callum.Acer\Desktop\South Central RP\gamemodes\roleplay.pwn(14507) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
if (PlayerData[i][pHunger] >= 25)
return 1;
forward HungerThirstCheck(playerid); public HungerThirstCheck(playerid) { foreach (new i : Player) { if (PlayerData[i][pHunger] >= 50) { GameTextForPlayer(i, "You are hungry, get something to eat.", 1, 6); } if (PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are starving, get something to eat before you die.", 8, 8); } if (PlayerData[i][pThirst] >= 50) { GameTextForPlayer(i, "You are thirsty, get something to drink.", 8, 8); } if (PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are becoming unstable, get something to drink before you dehydrate.", 8, 8); } } } return 1; }
forward HungerThirstCheck(playerid); public HungerThirstCheck(playerid) { foreach(new i : Player) { if(PlayerData[i][pHunger] >= 50) { GameTextForPlayer(i, "You are hungry, get something to eat.", 1, 6); } if(PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are starving, get something to eat before you die.", 8, 8); } if(PlayerData[i][pThirst] >= 50) { GameTextForPlayer(i, "You are thirsty, get something to drink.", 8, 8); } if(PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are becoming unstable, get something to drink before you dehydrate.", 8, 8); } } return 1; }
forward HungerThirstCheck(playerid); public HungerThirstCheck(playerid) { foreach (new i : Player) { if (PlayerData[i][pHunger] >= 50) { GameTextForPlayer(i, "You are hungry, get something to eat.", 1, 6); } else if (PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are starving, get something to eat before you die.", 8, 8); } else if (PlayerData[i][pThirst] >= 50) { GameTextForPlayer(i, "You are thirsty, get something to drink.", 8, 8); } else if (PlayerData[i][pHunger] >= 25) { GameTextForPlayer(i, "You are becoming unstable, get something to drink before you dehydrate.", 8, 8); } } return 1; }
forward HungerThirstCheck(playerid);
public HungerThirstCheck(playerid)
{
foreach (new i : Player)
{
if (PlayerData[i][pHunger] >= 50)
{
GameTextForPlayer(i, "You are hungry, get something to eat.", 1, 6);
}
if (PlayerData[i][pHunger] >= 25)
{
GameTextForPlayer(i, "You are starving, get something to eat before you die.", 8, 8);
}
if (PlayerData[i][pThirst] >= 50)
{
GameTextForPlayer(i, "You are thirsty, get something to drink.", 8, 8);
}
if (PlayerData[i][pHunger] >= 25)
{
GameTextForPlayer(i, "You are becoming unstable, get something to drink before you dehydrate.", 8, 8);
}
}
}
return 1;
}
PHP код:
|
Don't use this check again.
Align the brackets and you'll see the problem |
forward HungerThirstCheck(playerid);
public HungerThirstCheck(playerid)
{
foreach (new i : Player)
{
if (PlayerData[i][pHunger] >= 50)
{
GameTextForPlayer(i, "You are hungry, get something to eat.", 1, 6);
}
if (PlayerData[i][pHunger] >= 25)
{
GameTextForPlayer(i, "You are starving, get something to eat before you die.", 8, 8);
}
if (PlayerData[i][pThirst] >= 50)
{
GameTextForPlayer(i, "You are thirsty, get something to drink.", 8, 8);
}
if (PlayerData[i][pHunger] >= 25)
{
GameTextForPlayer(i, "You are becoming unstable, get something to drink before you dehydrate.", 8, 8);
}
}
return 1;
}