SA-MP Forums Archive
warning 209: function "RaceTime" should return a value - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 209: function "RaceTime" should return a value (/showthread.php?tid=606178)



warning 209: function "RaceTime" should return a value - Micko123 - 30.04.2016

Here is the whole RaceTime
Код:
forward RaceTime(raceid);
public RaceTime(raceid)
{
	RaceInfo[raceid][racetime] ++;
	if(floatround((RaceInfo[raceid][racetime] / 10), floatround_floor) >= RaceInfo[raceid][racetimeout])
	return 1;
}
Have no idea why it is says
Код:
warning 209: function "RaceTime" should return a value



Re: warning 209: function "RaceTime" should return a value - povargek - 30.04.2016

Maybe this:

Код:
forward RaceTime(raceid);
public RaceTime(raceid)
{
	RaceInfo[raceid][racetime] ++;
	if(floatround((RaceInfo[raceid][racetime] / 10), floatround_floor) >= RaceInfo[raceid][racetimeout]) return 1;

	return 0;
}



Re: warning 209: function "RaceTime" should return a value - Micko123 - 01.05.2016

Quote:
Originally Posted by povargek
Посмотреть сообщение
Maybe this:

Код:
forward RaceTime(raceid);
public RaceTime(raceid)
{
	RaceInfo[raceid][racetime] ++;
	if(floatround((RaceInfo[raceid][racetime] / 10), floatround_floor) >= RaceInfo[raceid][racetimeout]) return 1;

	return 0;
}
Yep it worked. Thank you [rep+]