new string[128], gethour, getmin, getsec; //line 22663
gettime(thour, tmin, tsec);//line 22664
new Day, Month, Year;//line 22665
getdate(Year, Month, Day);//line 22666
if(thour <= 9){format(gethour, sizeof(gethour), "0%d", thour);} else {format(gethour, sizeof(gethour), "%d", thour);} //line 22667
if(tmin <= 9){format(getmin, sizeof(getmin), "0%d", tmin);} else {format(getmin, sizeof(getmin), "%d", tmin);}
if(tsec <= 9){format(getsec, sizeof(getsec), "0%d", tsec);} else {format(getsec, sizeof(getsec), "%d", tsec);}
format(string, sizeof(string), "~b~~h~~h~Game Time: ~w~%s:%s:%s", gethour, getmin, getsec);
TextDrawSetString(TimeTD, string);
D:\Program Files\SAMP\SAMP SERVER\zRP 0.3e\gamemodes\ZRP.pwn(22667) : error 035: argument type mismatch (argument 1) D:\Program Files\SAMP\SAMP SERVER\zRP 0.3e\gamemodes\ZRP.pwn(22667) : error 035: argument type mismatch (argument 1) D:\Program Files\SAMP\SAMP SERVER\zRP 0.3e\gamemodes\ZRP.pwn(22667) : error 035: argument type mismatch (argument 1) D:\Program Files\SAMP\SAMP SERVER\zRP 0.3e\gamemodes\ZRP.pwn(22667) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Add spaces after brackets, is that your problem?
Like so pawn Код:
|
The variable 'gethour' is an integer, and you're trying to format it as if it's a string.
The compiler ignores spaces it's just common practice to keep it neat with spaces. |
format(gethour, sizeof(gethour), "0%d", thour);
// That^ to this:
gethour = thour;
You aren't even trying to convert it to a string by what I'm looking at.
You can easily do this: pawn Код:
|