Errors on "format"
#1

Hi.

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
My code is the following :

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 
0strlen(format); i++)
    {
        
        switch(
format[i])
        {
            
/*************************
                    Jour
            *************************/
            
            
case 'd'format(stringsizeof(string), "%s%02d"stringcdate[2]); 
(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.
Reply


Messages In This Thread
Errors on "format" - by S4t3K - 20.06.2014, 10:29
Re: Errors on "format" - by Golf - 20.06.2014, 10:38
Re : Errors on "format" - by S4t3K - 20.06.2014, 10:41
Re: Errors on "format" - by NaClchemistryK - 20.06.2014, 11:08
Re : Errors on "format" - by S4t3K - 20.06.2014, 11:20
Re: Errors on "format" - by Vince - 20.06.2014, 11:42
Re : Errors on "format" - by S4t3K - 20.06.2014, 12:31

Forum Jump:


Users browsing this thread: 3 Guest(s)