ReadInt multi platform bug

BlitzMax Forums/BlitzMax Programming/ReadInt multi platform bug

Tricky(Posted 2005) [#1]
I have not tried this out in Linux yet, only in Windows XP and MacOS.

I started on a puzzle game in Windows, and I'm now using a Mac to finish the project. But something really funny happened which causes a lot of trouble.

I created a level editor in the game, and I used it myself to create the default puzzles. Now it comes, all the levels I created will not load in the MacOS version of the game, and I'm really convinced it will not work vice versa either. (I created a test level on the MAC and that loads fine)

The sole problem lies in the ReadInt/WriteInt command is what I found out. Any other command like ReadByte and ReadString works fine, but ReadInt returns totally diffrent values than the Win32 version does, while the file itself is the same file, only transferred from Windows.


*(Posted 2005) [#2]
you are using littleendian arent ya?


Tricky(Posted 2005) [#3]
What is "littleendian"?


Perturbatio(Posted 2005) [#4]
http://www.blitzwiki.org/index.php/Endianness


Tricky(Posted 2005) [#5]
Thanks, that helped me....
Forgive me for thinking this was a bug.
You gotta understand that today is the first day I actually take a MAC into usage....