Hi
I’m still pretty new when it comes to arrays etc.
I need to set up a temp array, using longs. This works with ints, but tried ‘long’ and nothing happens.:
var dataValues : long[];
Should I be doing this another way?
My reasoning is that I want to store high score values. Int only appears to go up to 7-8 digits long? (Correct me if I’m wrong) And I believe that the High Score will most definitely exceed this limit. I need an array to store not just high score, but other scores into array to check against an array of names referring to each value. This works as required with ints, but not long.
Thanks
by “Nothing Happens”, i mean that when i go to fill that long[ ] array like so:
var tempData : long[] = EasySave.loadLongArray( "globalData.txt" );
… the tempData doesn’t fill with the values.
So not sure if it’s a Unity thing or an EasySave issue yet. If the above were ints, then it works fine.
long doesn’t show up in the inspector.
print (int.MaxValue);
// 2147483647
–Eric
ah, okay so just because i’m not seeing the array in the inspector, i shouldn’t assume it’s not working… **
I’ll do a quick print check and see, thanks Eric
EDIT: A check shows that the long[ ] is working. Thanks again, Eric. Learnt something new today 