Posts: 498
Threads: 34
Joined: Jan 2010
Reputation:
0
I'd need an array with a size of 2048 * 500. I need only 0 or 1 in each cell.
How could I do it with bits?
Posts: 399
Threads: 28
Joined: Nov 2007
Reputation:
0
How about 'bool' tag? You can't have anything except 0 or 1 (false or true) using it.
Posts: 498
Threads: 34
Joined: Jan 2010
Reputation:
0
let's imagine a 6x4 grid:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
like if there is 6 players, and 4 property overall. the grid contains a marker.
for example, if player 3 has a key to car #2, the grid changes that way:
0 0 0 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
I don't need anything apart from 0 and 1. I need one bit.
new var[6][4]; vs new bool:var[6][4]; :
the first one can be from 0 to 4294967295. it stores 32 bits. i need 1 bit.
the second one can be from 0 to 1. it stores 1 bit.
remember.. this is a 6x4 grid. imagine that on a 2048x500 grid. i need only 1 bit...