Error with clock/time
#3

Quote:
Originally Posted by Johnson_boy
You could try this:

pawn Код:
new ClockMinutes;
new ClockHours;
Код:
public OnGameModeInit()
{
	ClockMinutes = 0;
	ClockHours = 0;
	
	SetTimer("Clock", 1000, true);
	SetTimer("SetTime", 1000, true);
	return 1;
}
Код:
forward SetTime();
public SetTime()
{
	for(new i = 0; i < MAX_PLAYERS; i ++)
	{
	  SetPlayerTime(i, ClockHours, ClockMinutes);
	}
	return 1;
}

forward Clock();
public Clock()
{
	ClockMinutes ++;
	if(ClockMinutes >= 60)
	{
	  ClockHours ++;
	  ClockMinutes = 0;
	}
	return 1;
}
That won't work. You have to define new ClockMinutes & ClockHours as a float.

This line causes the warnings / errors:

pawn Код:
SetPlayerTime(i, ClockHours, ClockMinutes);
Reply


Messages In This Thread
Error with clock/time - by bajskorv123 - 23.02.2010, 09:37
Re: Error with clock/time - by lameguy - 23.02.2010, 16:20
Re: Error with clock/time - by Jakku - 25.02.2010, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)