[FIXED] Char-array with sizeof() as size
#1

pawn Код:
new array[5];

main()
{
    new bool:charArray[sizeof(array) char]; // Line from which errors originate
}
Quote:

error 001: expected token: "]", but found "char"
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Any way to do this? Do I have the syntax wrong or is this just not possible?

Fixed:

pawn Код:
new bool:charArray[(sizeof(array)) char];
Needed wrapping in parenthesis.
Reply


Messages In This Thread
[FIXED] Char-array with sizeof() as size - by MP2 - 10.03.2013, 15:06
Re: [FIXED] Char-array with sizeof() as size - by mastermax7777 - 10.03.2013, 17:33
Re: [FIXED] Char-array with sizeof() as size - by mastermax7777 - 10.03.2013, 20:02
Re: [FIXED] Char-array with sizeof() as size - by Bakr - 10.03.2013, 20:27
Re: [FIXED] Char-array with sizeof() as size - by MP2 - 10.03.2013, 21:08
Re: [FIXED] Char-array with sizeof() as size - by mastermax7777 - 19.03.2013, 02:52
Re: [FIXED] Char-array with sizeof() as size - by Scenario - 19.03.2013, 03:06
Re: [FIXED] Char-array with sizeof() as size - by mastermax7777 - 19.03.2013, 05:00

Forum Jump:


Users browsing this thread: 1 Guest(s)