SA-MP Forums Archive
y_Timer problem - 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: y_Timer problem (/showthread.php?tid=565607)



y_Timer problem - vannesenn - 28.02.2015

Hi guys,
I made repeat timer(timer's ID will be save into array) and I have this errors

Quote:

Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : error 012: invalid function call, not a valid address
E:\Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : warning 215: expression has no effect
E:\Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : warning 215: expression has no effect
E:\Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : error 001: expected token: ";", but found ")"
E:\Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : error 029: invalid expression, assumed zero
E:\Silvio\Projekti\Pawno\GameModovi\Od nula\Haswell RolePlay\pawno\include\HRP\HRP_timers.inc(395) : fatal error 107: too many error messages on one line

Code for start timer is

Код:
_HRP_SpeedoTimer[playerid] = repeat _HRP_Speedo(playerid, GetPlaverVehicleID(playerid));
Timer's code

Код:
timer _HRP_SpeedoTimer[18000](playerid, _vID) // LINE WITH ERROR
{
	new _string[18];

   	format(_string, 18, "%.3f Mi", _HRP_Vozilo[_vID][_vKilometraza]);
  	PlayerTextDrawSetString(playerid, _HRP_Speedo[playerid][true], _string);
  	format(_string, 10, "%.2f L", _HRP_Vozilo[_vID][_vGorivo]);
  	PlayerTextDrawSetString(playerid, _HRP_Speedo[playerid][2], _string);  	
	return (true);
}



Re: y_Timer problem - Misiur - 28.02.2015

_HRP_SpeedoTimer is your array of timers, not timer name. so change "timer _HRP_SpeedoTimer" to "timer _HRP_Speedo"


Re: y_Timer problem - vannesenn - 28.02.2015

Lol, I din't saw that. Thanks !