SaveGame with GBCDataCabinet

Wonderful day!

Im struggeling creating a saveGame for my app.

I made the following code:

local GBCDataCabinet = require("plugin.GBCDataCabinet") local success success = GBCDataCabinet.load("saveGame") if succes then   dbgText.text = "game was already started once"   print("game was already started once") else   success = GBCDataCabinet.createCabinet("saveGame")   if success then       dbgText.text = "succes createCabinet saveGame"       print("succes createCabinet saveGame")   else     dbgText.text = "failed"   end end

and it is ALWAYS failed. I’m not sure the simulator can even do that, but when im compiling my app, on the smartphone(android) it is also always failed. What is wrong with the code?

Thanks!

Welcome to the forums.  

In this line:

if succes then

you have success misspelled.  But I don’t know why the next if statement fails. Since this is a 3rd party plugin, it’s best that you reach out to the developer for help. His contact information should be on the plugin page:

https://marketplace.coronalabs.com/plugin/gbc-data-cabinet

Rob

Actually, that did the trick … im sorry for creating a thread for this

thanks!!

Just saw this, but glad it has been resolved.   :slight_smile:

–John

GBCDataCabinet Author

Welcome to the forums.  

In this line:

if succes then

you have success misspelled.  But I don’t know why the next if statement fails. Since this is a 3rd party plugin, it’s best that you reach out to the developer for help. His contact information should be on the plugin page:

https://marketplace.coronalabs.com/plugin/gbc-data-cabinet

Rob

Actually, that did the trick … im sorry for creating a thread for this

thanks!!

Just saw this, but glad it has been resolved.   :slight_smile:

–John

GBCDataCabinet Author