22.12.2009, 03:13
Hi all!
I've searched and checked every single topic within the results, but never found a 100% working solution.
This warning is pretty known in this case, but I just wanna know how to fix, if anybody knows...
To the problem...
If you have an array with no cell size (myVar[]) and you try to use sizeof with the array, you will get this warning
My "example" is in OnPlayerText, when I try to format the text[] var.
I can't use 128 as len (or so I've heard), and sizeof gives this error.
Any solution?
(Here's the line)
This gives the warning (since the size of 'text' is unknown)
Please help me guys :'P
I really want this to work.
(As I said, I've heard some "rumours" that 128 is "incorrect")
Thanks.
- lrZ^
I've searched and checked every single topic within the results, but never found a 100% working solution.
This warning is pretty known in this case, but I just wanna know how to fix, if anybody knows...
To the problem...
If you have an array with no cell size (myVar[]) and you try to use sizeof with the array, you will get this warning
Code:
warning 224: indeterminate array size in "sizeof" expression (symbol "")
I can't use 128 as len (or so I've heard), and sizeof gives this error.
Any solution?
(Here's the line)
pawn Code:
format( text, sizeof( text ), "Sometext %s", text );
Please help me guys :'P
I really want this to work.
(As I said, I've heard some "rumours" that 128 is "incorrect")
Thanks.
- lrZ^