Bug saving/loading global integer variables

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Bug saving/loading global integer variables

Postby JMC002 Neil » Sat May 10, 2008 3:30 pm

Apologies if this has already been reported - I looked but couldn't find any reference to it.

I spent a while looking for what I though was an elusive bug in my code. I finally realised that there is a weird little bug that occurs when global integer variables are saved then loaded (in saved games). If the value of the variable is -1 when a game is saved, it is 1 (not minus) when that game is later loaded! Other negative values are saved and restored correctly, as far as I can see. Only global integer variables with the value -1 are affected!

I'm using version 4.51 of Adventure Maker (full version) on Windows XP.
Last edited by JMC002 Neil on Sun May 11, 2008 10:13 pm, edited 2 times in total.
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby JMC002 Neil » Sat May 10, 2008 3:33 pm

I wonder if someone else could try saving / loading a global integer variable with a value of -1, to see if it happens to them?
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby GM-Support » Sun May 11, 2008 12:09 am

Yes, I have just tested it and you are perfectly right. This is definitely a bug.

Thanks for reporting it. It will be fixed asap.

Regards,
GM-Support
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby Chromegloss55 » Tue May 13, 2008 11:41 am

I didn't know that...

Does it do the same with variants?
_________________
Sudden Infant Death Syndrome (SIDS) Forum
Last edited by Chromegloss55 on Tue Feb 24, 2009 3:14 pm, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby JMC002 Neil » Tue May 13, 2008 11:47 am

Chromegloss55 wrote:Does it do the same with variants?


I haven't tried it with Variant variables. I'd guess it'd be the same but I'll try it and see....
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby JMC002 Neil » Tue May 13, 2008 11:54 am

....actually, the "-1" is saved and loaded correctly in a Variant variable (I just tried it). Possibly because it is stored as a string rather than a numerical value.
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby Lyberodoggy » Tue May 13, 2008 12:04 pm

Then you could save it in a variant before exiting the game and load the value from it using th ConvertToNumber Function...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby JMC002 Neil » Tue May 13, 2008 12:20 pm

Lyberodoggy wrote:Then you could save it in a variant before exiting the game and load the value from it using th ConvertToNumber Function...


True. I avoided the issue by simply not using the value -1! Still a bug though, and worth reporting. :)
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby GM-Support » Wed May 14, 2008 9:34 pm

The bug should be fixed in AM 4.5.2.

Thanks.
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby JMC002 Neil » Wed May 14, 2008 9:39 pm

GM-Support wrote:The bug should be fixed in AM 4.5.2.

Thanks.



Cool! (again) 8)
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby JMC002 Neil » Wed May 14, 2008 10:34 pm

GM-Support wrote:The bug should be fixed in AM 4.5.2


Indeed; just tried saving a Global Integer Variable at -1 and it was still -1 when the game was reloaded. :D
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom

Postby Chromegloss55 » Thu May 15, 2008 7:59 pm

....actually, the "-1" is saved and loaded correctly in a Variant variable (I just tried it). Possibly because it is stored as a string rather than a numerical value.


Actually... I'll be blunt. A variant variable isn't strictly a string. :D

In this example the variant variable is of SUBTYPE Long, which is a type of integer.

You can read about it here:

http://www.hotlinkfiles.com/files/1243504_xlac2/CHROMETECH.htm#Music

It's a common misconception people have, I'd just thought I'd mention it here...
_________________
Steroid Rehab Forum
Last edited by Chromegloss55 on Tue Feb 24, 2009 3:23 pm, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby JMC002 Neil » Thu May 15, 2008 9:38 pm

Fair enough. Clearly, it was either handled or saved differently to "Integer" variables, because one was saved / restored correctly, and the other was not.

It's fixed now, anyway. :)
JMC002 Neil D.
Peace through Superior Firepower
Image
JMC002 Neil
Member
 
Posts: 22
Joined: Fri May 02, 2008 12:44 pm
Location: United Kingdom


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests