• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker ini saving bool

S

Sn3akyP1xel

Guest
I have a bunch of true/false globals which i need to save/load. Will 'ini_write_real()' read my bools as 0s and 1s? I pondered for 1 second changing all my false/trues to 0/1s but can't be bothered :p
Can someone point me in the right direction, thanks in adv
 

FrostyCat

Redemption Seeker
Yes, it will. And that wouldn't matter to you if you don't compare Booleans to true and false like a noob.
 

TsukaYuriko

☄️
Forum Staff
Moderator
One thing to add is that while it is indeed unnecessary to compare variables holding boolean values to boolean values, technically, it shouldn't make a difference as true/false are mapped to 1 and 0, respectively. They will save as 1/0 and be read back like that. They wouldn't even be recognized as being of the boolean data type unless you're using the bool function to convert them to that.
 
S

Sn3akyP1xel

Guest
perfect. So no problem saving then, but would have to convert back to true/false at the loading stage
 
Top