error 001: expected token: ",", but found ";" -
Acres - 25.01.2014
hey guys i got 1 error any ideas how to fix this?
Код:
error 001: expected token: ",", but found ";"
Line:
Код:
format(TimeStr,20,"%02d:%02d",(Hour,Min);
Re: error 001: expected token: ",", but found ";" -
Dignity - 25.01.2014
Can you give me your full code please?
Re: error 001: expected token: ",", but found ";" -
ProjectMan - 25.01.2014
Quote:
Originally Posted by Acres
hey guys i got 1 error any ideas how to fix this?
Код:
error 001: expected token: ",", but found ";"
Line:
Код:
format(TimeStr,20,"%02d:%02d",(Hour,Min);
|
pawn Код:
format(TimeStr,20,"%02d:%02d",Hour,Min);
Btw, why is there "02"?
Re: error 001: expected token: ",", but found ";" -
Acres - 25.01.2014
Код:
public UpdateTime()
{
new Hour,Min,Sec;
gettime(Hour,Min,Sec);
new TimeStr[20];
format(TimeStr,20,"%02d:%02d",(Hour,Min);
TextDrawSetString(TimeTD,TimeStr);
return 1;
}
Re: error 001: expected token: ",", but found ";" -
Dignity - 25.01.2014
pawn Код:
public UpdateTime()
{
new Hour,Min,Sec;
gettime(Hour,Min,Sec);
new TimeStr[20];
format(TimeStr,20,"%02d:%02d",Hour,Min);
TextDrawSetString(TimeTD,TimeStr);
return 1;
}
You opened your format, but it was never closed. (Because you missed a brace - you needed to add two, see quote). I'm not sure if this is a necessity or not, but I removed the opening brace of Hour,Min, I doubt it is though.
Quote:
format(TimeStr,20,"%02d:%02d",(Hour,Min));
|
Re: error 001: expected token: ",", but found ";" -
$Marco$ - 25.01.2014
I think this will solve it.
format(TimeStr,20,"%02d:%02d",(Hour,Min));
Re: error 001: expected token: ",", but found ";" -
FUNExtreme - 25.01.2014
Quote:
Originally Posted by ProjectMan
pawn Код:
format(TimeStr,20,"%02d:%02d",Hour,Min);
Btw, why is there "02"?
|
If you have a number that's less than 2 characters, it'll show up as "01" to "09".
%03d would give "001" and so on.
As for the answer to this thread, it's posted above. Your brackets aren't matching.
Re: error 001: expected token: ",", but found ";" -
McBan - 25.01.2014
Код:
public UpdateTime()
{
new Hour,Min,Sec;
gettime(Hour,Min,Sec);
new TimeStr[20];
format(TimeStr,20,"%02d:%02d",Hour,Min);
TextDrawSetString(TimeTD,TimeStr);
return 1;
}