Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

Robbert

[Crash] Compare number with string error while loading save game

Recommended Posts

Robbert    0

Please choose a category
*Pick the option that fits the issue the most. Ideally use this in your thread title aswell*

[Crash]

Platform
* Pick your platform. For instance, standalone on Mac is also possible.

  • Steam
  • Linux
  • Windows
    Do you use mods?
     
             yes
    Version Number
     

    Linux: 90423 LINUX_STEAM
    Windows: 90423

     

    Issue title
     

    Compare number with string error while loading save game
     

    Steps to reproduce
     

    Load save game, with or without mods it gives the same error.

    Describe your issue
     

    The bug occured after 33days ingame and trying to load the save game.
    Played the game first with two mods enabled:
    - Where's my Beefalo
    - Smarter Crock Pot

    When loading the save game this error occurs:
    attempt to compare number with string (see attached screenshot).

    Disabling the mods does not solve the problem.

    The problem occured on my girfriends Windows 7 machine.
    Then we logged in to her steam account on my Ubuntu 13.10 machine and the same error occured.

post-336495-0-99137900-1391432373_thumb.

Share this post


Link to post
Share on other sites
Wade    309

I would recommend trying to uninstall the game, and then disabling the Steam Cloud before re-installing the game to see if that works.

Share this post


Link to post
Share on other sites
Robbert    0

The game itself runs fine, it's just that the save game won't load.

Like stated in my bug report, we did try running the game on a different machine, which resulted in the same behaviour.

I don't really see how a clean install will fix this problem (with the save game) when we already tried the above.

Could you maybe explain why you think this will fix our problem?

Share this post


Link to post
Share on other sites
Wade    309

Oh, I thought the game itself wasn't running for you.

 

For the save game, the mods you were using have likely broken that particular save. Unfortunately all you can do is delete the save game and start anew.

Share this post


Link to post
Share on other sites
Nibokal    0

Having the exact same issue with already 3 ruinied savegames now (past 70 days, and about 30 twice). The mod we have in Common: Smarter Crock Pot so for anyone else having the same issue most likely the culprit is Smarter Crock Pot.

Share this post


Link to post
Share on other sites
Wade    309

Unfortunately, yes, that mod seems to be problematic at the moment.

 

Since it affects the values in the save data, it will corrupt the save games it is used in.

Share this post


Link to post
Share on other sites
Dujour    14

I was able to recover my save game by altering the function:

 

 

function Stackable:IsFull()
 
    if ( type(self.stacksize) == "number" and type ( self.maxsize ) == "number") then
        return self.stacksize >= self.maxsize
    else
        return true
    end
 
end
 
You can find the function in the error message.
 
If you aren't comfortable altering LUA files or modding, don't do this, just start over. : )

Share this post


Link to post
Share on other sites
slinkast    0

 

I was able to recover my save game by altering the function:

 

 

function Stackable:IsFull()
 
    if ( type(self.stacksize) == "number" and type ( self.maxsize ) == "number") then
        return self.stacksize >= self.maxsize
    else
        return true
    end
 
end
 
You can find the function in the error message.
 
If you aren't comfortable altering LUA files or modding, don't do this, just start over. : )

 

Dude... dude...DUDE!!!

OMG i love you man, u just saved my 36 days save file (ik  its not dat much but still ^^)

ur solution works perfectly, i was going to quit to dont starve cuz it was my 4 death, and then this map was perfect, and i lose it cuz a crash. i got mad, but u just made my day.

u r a genius, i tried to modify that same file, but i didnt know what to change, ty very much

Share this post


Link to post
Share on other sites
Nadevill    7

Im sorry you lost your saves.

The feature that placed the % character in the stackable components has been removed for now.

I hope you try again (maybe backup before) and notify me should any problems return.

 

Second, the code published here may be useful to me so thank you.

Share this post


Link to post
Share on other sites
Neoris    0

 

I was able to recover my save game by altering the function:

 

 

function Stackable:IsFull()
 
    if ( type(self.stacksize) == "number" and type ( self.maxsize ) == "number") then
        return self.stacksize >= self.maxsize
    else
        return true
    end
 
end
 
You can find the function in the error message.
 
If you aren't comfortable altering LUA files or modding, don't do this, just start over. : )

 

 

Can you guys explain this for noobs like me? xd. 

 

Ty !!

Share this post


Link to post
Share on other sites
Juulis    0

 

I was able to recover my save game by altering the function:

 

 

function Stackable:IsFull()
 
    if ( type(self.stacksize) == "number" and type ( self.maxsize ) == "number") then
        return self.stacksize >= self.maxsize
    else
        return true
    end
 
end
 
You can find the function in the error message.
 
If you aren't comfortable altering LUA files or modding, don't do this, just start over. : )

 

 

Thanks alot! It worked, I can now go through my first Winter in ages!! :)

Tutorial:

Go to the don't starve folder in steamapps->common->Don't Starve.

Open the folder data->scripts->components.

Open the "stackable.lua" with notepad (or open notepad and drag this into notepad to open.

search for "function Stackable:IsFull()" and highlight this part (it's the SECOND one you find):

 

function Stackable:IsFull()
 
    if ( type(self.stacksize) == "number" and type ( self.maxsize ) == "number") then
        return self.stacksize >= self.maxsize

    end

end

 

 

Can anyone confirm there is 2x"end" in this? I already changed mine so I'm not 100% sure....

 

Then you paste his codesnip replacing your highlighted.

 

If you don't understand this tutorial, you really shouldn't mess with the files. Don't ask for more help.

Also, I'm not sure this will be a permanent fix since it's altering the game files, and if you cache-check the files through Steam, it may be replaced with the old stackable.lua ..

 

Also, altering gamefiles without properly testing etc, may create more bugs than already is there. This seems to work atm, but may cause problems in the future.

Share this post


Link to post
Share on other sites