LuaUI Error Message: Failed to load LuaUI/main.lua

LuaUI Error Message: Failed to load LuaUI/main.lua

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
User avatar
Kaot
Posts: 23
Joined: 10 Mar 2007, 02:11

LuaUI Error Message: Failed to load LuaUI/main.lua

Post by Kaot »

I tried to use Lua Scripts by downloading them and extracting them into the Folder ~/.spring/LuaUI, as told in the Installation Description.

If i now start the Game, the Landscape appears and in the Console in the upper middle the following Error Message always appears:

Code: Select all

Failed to load LuaUI/main.lua ( LuaUI/main.lua: No such file or Directory )
If i exit the Game the follwing Line is written into the Console:

Code: Select all

Using LUAUI_DIRNAME = LuaUI/
which is also the wrong Path.

I tried to set the Path to the main.lua File, which is located in /usr/share/games/spring/LuaUI (Gentoo EBuild 0.74-r3), via the Environment Variable LUAUI_DIRNAME:

Code: Select all

LUAUI_DIRNAME=/usr/share/games/spring/LuaUI
If i now start the Game with

Code: Select all

LUAUI_DIRNAME=/usr/share/games/spring/LuaUI spring 
i still get the same Error and the same Console Text if i exit the Game:

Code: Select all

Using LUAUI_DIRNAME = LuaUI/
So the Path wasn't applied.

Where do i need to set the Variable?
I also tried to insert the Line into the ~/.springrc File, without Success.

If i do a Symlink from /usr/share/games/spring/LuaUI/main.lua to
~/.spring/LuaUI/main.lua and start the Game the main.lua is found and the next File, utils.lua, is now missing.

Do i really need to copy or symlink all the .lua Files into the private per User LuaUI Directory?

This Way it is difficult to update the ~/.spring/LuaUI Directory if i installed my own Scripts or Scripts from UnknownFiles there and a new spring Build is released.

I hope, there exists a Solution to this Workaround of mine.
Please let me know.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Are you sure the scripts themselves were placed in LuaUI/Widgets/ (not sure if that matters actually)?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

In 0.74b3, yes.

The LUA routines bypassed the filesystem code in that release, this has been fixed in SVN, so next release it'll be possible to properly separate your own LUA files from the default LUA files.
User avatar
Kaot
Posts: 23
Joined: 10 Mar 2007, 02:11

Post by Kaot »

Thanks for the very fast Replies Guys!

@Kloot
Yes i kept the same Directory Structure, like in the Zip File i downloaded from UnkownFiles.

Code: Select all

LuaUI/Images/<Images for the Scripts>
LuaUi/Widgets/*.lua
@Tobi
I see, so i need to wait for a new Version ;)
Everytime i play with the SVN Version i get out of sync in each Game ;)
So i guess it's better to stay on 0.74b3.
Or is there a Possibility to make the SVN Version behave like an older Version, so that it is possible to stay in sync with the older Versions out there?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

No, due to the design of the code it's generally impossible to modify anything gameplay related without making it desync from the release builds as a side effect.

Just use 0.74b3 until a new version is released.
Post Reply

Return to “Linux”