07.12.2012, 12:11
Quote:
Debug your code by putting print lines in the code so you can interactively see what the code is doing.
For instance: pawn Код:
|
PHP код:
MilkingCows > 0
Milking Cows == 1
Disabled checkpoint, setting new one
-End of code block
PHP код:
else if(IsMilkingCows[playerid] > 0)//farmerjob
{
print("Milking cows > 0");
if(IsMilkingCows[playerid] == 1)
{
print("\tMilking cows == 1");
MilkTime[playerid] += 1;
TogglePlayerControllable(playerid, 0);
DisablePlayerCheckpoint(playerid);
print("\tDisabled checkpoint, setting new one");
SetPlayerCheckpoint(playerid, -415.4362,-1367.9500,23.7354,1.0);
IsMilkingCows[playerid] = 2;
print("\t- End of code block");
}
else if(IsMilkingCows[playerid] == 2)
{
MilkTime[playerid] += 1;
print("\tMilking cows == 2");