20.06.2014, 10:29
Hi.
I simply used "format" to...format a string, but when compiling, I got these errors :
My code is the following :
(I try to make a date function, with almost the same features as the php version but in pawn).
I absolutely don't know the source of the errors, so if someone was able to help me, thanks to him in advance.
I simply used "format" to...format a string, but when compiling, I got these errors :
Код:
date_kilou.pwn(19) : error 012: invalid function call, not a valid address date_kilou.pwn(19) : error 029: invalid expression, assumed zero date_kilou.pwn(19) : warning 215: expression has no effect date_kilou.pwn(19) : error 001: expected token: ";", but found "sizeof" date_kilou.pwn(19) : fatal error 107: too many error messages on one line
PHP код:
new string[500] = "";
new cdate[3], time[3];
gettime(time[0], time[1], time[2]);
getdate(cdate[0], cdate[1], cdate[2]);
for(new i = 0; i < strlen(format); i++)
{
switch(format[i])
{
/*************************
Jour
*************************/
case 'd': format(string, sizeof(string), "%s%02d", string, cdate[2]);
I absolutely don't know the source of the errors, so if someone was able to help me, thanks to him in advance.