GooborgStudios / synglechance

The engine for the award-winning game, OneShot
http://www.oneshot-game.com
GNU General Public License v2.0
37 stars 5 forks source link

Language script error on game start (Linux) #22

Closed jacobrham closed 6 years ago

jacobrham commented 6 years ago

I've compiled the engine on Arch Linux to the best of my ability, but when I start the game I get this error: Script 'i18n_Language' line 55: NameError occured. uninitialized content #(Class:language)::Zlib

Relevant part of the log: Load locale: en 091:i18n_Language:55:intr': uninitialized constant #::Zlib (NameError) from 091:i18n_Language:48:in set' from 090:Persistent:39:inlang=' from 090:Persistent:26:in initialize' from 090:Persistent:68:innew' from 090:Persistent:68:in load' from 110:Main:18:in

' Traceback (most recent call last): 110:Main:9:in block in <main>': undefined method[]' for nil:NilClass (NoMethodError) ` I think this is due to an issue with Zlib during compilation, can anyone confirm?

queengooborg commented 6 years ago

Hey @Yummychickenblue,

I think you might be trying to compile an older release. Since v0.5.2, aka 18030d9, I've swapped Zlib's CRC32 out for Boost's implementation, and created a C++ to Ruby binding for it. Can I confirm that you've pulled the latest changes of the master or linux branches?

jacobrham commented 6 years ago

@vinyldarkscratch I cloned and built the Master branch (using ruby 2.5, I know that there's a bug with it but I can't figure out how to make it use 2.3) but I couldn't find a package specific for Boost.CRC so I assumed it was bundled with the Boost headers.

queengooborg commented 6 years ago

If you run qmake mkxp.pro MRIVERSION=2.3 then it will look for Ruby 2.3 in particular. But regardless of whether it’s using 2.3 or 2.5, you shouldn’t be seeing that message at all. As in, Zlib isn’t even used in that file, or anywhere in the runtime.

If you run git rev-parse --short HEAD, what’s the return value?

queengooborg commented 6 years ago

I also just realized another possibility of what’s going on. My bad! By any chance, have you run ruby rpgscript.rb ./scripts [path to OneShot in Steam?

jacobrham commented 6 years ago

@vinyldarkscratch running the git command returns '75a235e'. I ran the ruby script and pointed it to a Wine installation of OneShot, I had already copied the files from the installation into the synglechance dir, so I don't think it did much. I ended up running the script on a clean compile of the engine and it was missing a script.

KockaAdmiralac commented 6 years ago

That sounds exactly like the error I was getting when I only compiled SyngleChance, and copied files from Windows installation but without running ruby rpgscript.rb ./scripts [path to your SyngleChance copy of OneShot data] to generate a new xScripts.rxdata file (so it was using OneShot's version of scripts that still use Zlib). Could you try pointing rpgscript.rb to the directory where you copied the files from Windows installation? What do you mean by "it was missing a script"?

jacobrham commented 6 years ago

@KockaAdmiralac @vinyldarkscratch I reran the script like you said, and it generated a new xScripts.rxdata. Now the game works perfectly with Ruby 2.5. I guess I'll continue playing and see if the bug that's supposed to exist with new version of Ruby actually does. Thanks for your help!

queengooborg commented 6 years ago

Thanks, @Yummychickenblue! The bug with Ruby 2.4 and 2.5 is that the game will save, but the save will become corrupt and show nothing but a black screen when you try to re-run the game. If, for some reason, this doesn't happen, please let me know so I can get to the bottom of the issue!