Mobbstar Posted February 1, 2016 Share Posted February 1, 2016 So I am trying to erase the save slot while it's being used, as if the player had died. And this works very well, too well in fact. You see, when the code triggers (by the way, it puts me right back to the main menu), the save selection only shows four slots anymore! (as opposed to five, when one owns RoG) What makes this even weirder is that it's not the first slot disappearing, it's the fifth that won't be displayed anymore. The issue resolves itself after restarting the game. Spoiler wilson.profile:Save(function() --GLOBAL.SaveGameIndex:EraseCurrent(function() --does it too, but doesn't erase the entire slot GLOBAL.SaveGameIndex:DeleteSlot(GLOBAL.SaveGameIndex:GetCurrentSaveSlot(), function() GLOBAL.TheFrontEnd:Fade(false, 3, function() --screen goes black GLOBAL.StartNextInstance() --show main menu end) end) end) Does anybody know why this might happen? If I find out on my own, I'll make sure to post it here, but there's other things that require my attention for now. Link to comment https://forums.kleientertainment.com/forums/topic/63627-erasing-a-save-slot-a-bit-too-much/ Share on other sites More sharing options...
Arkathorn Posted February 1, 2016 Share Posted February 1, 2016 (edited) The reason it is the fifth likely has to do with the menu constructor (which proceeds top-down) successfully catching a nil value when it encounters the deleted slot, and causing the other slots to not be displaced by it. I'll look into why this is happening, and get back to you. EDIT: Not happening for me. Perhaps there is some unique data structure in your 'SaveGameIndex' that's causing it? That's happened to me before. Edited February 1, 2016 by Arkathorn Link to comment https://forums.kleientertainment.com/forums/topic/63627-erasing-a-save-slot-a-bit-too-much/#findComment-716138 Share on other sites More sharing options...
Mobbstar Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) This issue is solved now. It didn't actually decrease the count of save slots. I just didn't enable the DLC before reloading the main screen Spoiler inst.profile:Save(function() GLOBAL.EnableAllDLC() GLOBAL.SaveGameIndex:DeleteSlot(GLOBAL.SaveGameIndex:GetCurrentSaveSlot(), function() GLOBAL.TheFrontEnd:Fade(false, 3, function() GLOBAL.StartNextInstance() end) end) end) It works like a charm! Edited February 4, 2016 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/63627-erasing-a-save-slot-a-bit-too-much/#findComment-717313 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now