Why do I get this error?
#1

Hi,
any of you got an idea why I get this error?

Код:
error 008: must be a constant expression; assumed zero
error 029: invalid expression, assumed zero
error 017: undefined symbol "n"
fatal error 107: too many error messages on one line
all on this line:
pawn Код:
new SpList[mysql_num_rows()], n=0;
Reply
#2

You cannot set array/string sizes dynamically, you must explicitly define them.

pawn Код:
new SpList[MAX_SPS], n=0;
mysql_num_rows() is a value that would only be obtainable after the script was compiled, which pawn does not allow - it must know the size of all strings/arrays prior to compilation.
Reply
#3

sad, already guessed that....
I hoped there was a way to make it more efficient, but I guess it's not possible -.-

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)