4 Errors, Due to a Format. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 4 Errors, Due to a Format. (
/showthread.php?tid=246984)
4 Errors, Due to a Format. -
-Rebel Son- - 07.04.2011
Код:
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : warning 215: expression has no effect
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : warning 215: expression has no effect
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : error 001: expected token: ";", but found ")"
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Dakota\Desktop\samp03csvr_win32\gamemodes\ww2.pwn(163) : fatal error 107: too many error messages on one line
In Line.
Код:
if(seconds < 10) format(string, sizeof string, "%d:0%d" minutes, seconds);
What the f'in fuck did i do wrong.
Re: 4 Errors, Due to a Format. -
Prumpuz - 07.04.2011
pawn Код:
if(seconds < 10) format(string, sizeof(string), "%d:0%d", minutes, seconds);
Re: 4 Errors, Due to a Format. -
-Rebel Son- - 07.04.2011
.... That's the same as the one i posted....
Re: 4 Errors, Due to a Format. -
s0nic - 07.04.2011
No its not..
Notice the:
And he gave you the fix:
Aswell as the comma after:
"%d:0%d"
Re: 4 Errors, Due to a Format. -
AntiGen - 07.04.2011
It's not the same, look closely.
Re: 4 Errors, Due to a Format. -
Hiddos - 07.04.2011
Quote:
Originally Posted by -Rebel Son-
.... That's the same as the one i posted....
|
Nope, you missed a comma:
pawn Код:
if(seconds < 10) format(string, sizeof string, "%d:0%d"/*here*/ minutes, seconds);
Re: 4 Errors, Due to a Format. -
Vince - 07.04.2011
Just do
format(string, sizeof(string), "%02d:%02d", minutes, seconds);
to always have 2 digits.