invalid expression, assumed zero
#1

Can you Fix it ?
Help me

PHP код:
public Loadrumah() {
    new 
num_rows,num_fields;
    
cache_get_data(num_rows,num_fields);
    if(
num_rows)
    {
        if(new 
=0sizeof(rInfo); r++)
        {
            
RumahInfo[r][rumahID] = cache_get_field_content_int (1,"rumahID",mysqlku);
            
RumahInfo[r][pemilik] = cache_get_field_content (2,"pemilik",mysqlku);
        }
    }
    return 
1;

PHP код:
D:\data aji\Samp server\gamemodes\percobaan.pwn(131) : error 029invalid expressionassumed zero
D
:\data aji\Samp server\gamemodes\percobaan.pwn(131) : error 017undefined symbol "r"
D:\data aji\Samp server\gamemodes\percobaan.pwn(131) : warning 215expression has no effect
D
:\data aji\Samp server\gamemodes\percobaan.pwn(131) : error 017undefined symbol "r"
D:\data aji\Samp server\gamemodes\percobaan.pwn(131) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line 131 if(new r =0; r < sizeof(rInfo); r++)

Thanks Before
Reply
#2

This line
Код:
if(new r =0; r < sizeof(rInfo); r++)
You are using an "if" statement but you're trying to do a "for" loop.

Fixed code:
Код:
for(new r =0; r < sizeof(rInfo); r++)
Reply
#3

UP! Wrong POST
Reply
#4

Quote:
Originally Posted by renatog
Посмотреть сообщение
This line
Код:
if(new r =0; r < sizeof(rInfo); r++)
You are using an "if" statement but you're trying to do a "for" loop.

Fixed code:
Код:
for(new r =0; r < sizeof(rInfo); r++)
thanks a lot rep+

i got this

PHP код:
D:\data aji\Samp server\gamemodes\percobaan.pwn(132) : error 039constant symbol has no size 
Reply
#5

Quote:
Originally Posted by Jihanz
Посмотреть сообщение
thanks a lot rep+

i got this

PHP код:
D:\data aji\Samp server\gamemodes\percobaan.pwn(132) : error 039constant symbol has no size 
From pawn-lang.pdf
Quote:
constant symbol has no size
A variable has a size (measured in a number of cells), a constant has no size. That is, you cannot use a (symbolic) constant with the sizeof operator, for example.

I can't help because I don't know what "rInfo" is. But assuming it's an enum, you can't get the size of an enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)