[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
#2

why the f would u want to use char
Reply
#3

nice.. -rep 3 for asking a nice question . . herp derp you people suck
Reply
#4

Perhaps if you didn't ask in the demeanor you did you wouldn't have gotten the negative reputation.

You should also use the search feature. It's neat.
Reply
#5

Quote:
Originally Posted by mastermax7777
Посмотреть сообщение
why the f would u want to use char
To use a quarter of the memory.

Why do you insist on making posts like these? Can't you learn to be nice?
Reply
#6

Quote:
Originally Posted by MP2
Посмотреть сообщение
To use a quarter of the memory.

Why do you insist on making posts like these? Can't you learn to be nice?
lol u think i dont know why u like char?

i was asking just for the heck of it.. i am nice and if i say fuck doesnt mean im bad person.. lol

Bakkr stfu .. rep away
Reply
#7

You're probably one of the most immature people on this forum, mastermax7777. The amount of posts you make that are just complete ignorance and nonsense... I'm surprised you haven't been banned yet!
Reply
#8

yes superior master fake Cock Big Cluck Godfather
your "mature" grammar doesn't make you better either

I Will Use Commas And Periods. I am YOUR great leader. Look at me Now! Char .. save memory save!! YOU DIDNT USE PACKED ARRAYS U FOOL
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)