Iceui Crash

Iceui Crash

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Iceui Crash

Post by kalda341 »

Iceui crashes with a

Code: Select all

Error in Update(): [string "LuaUI/Widgets/gui_iceui.lua"]:748: attempt to index local 'name' (a nil value)
error everytime I go into the options menu. Any ideas of how to fix?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Iceui Crash

Post by Niobium »

The code in question

Code: Select all

for _,v in ipairs(VFS.DirList(PROFILES_DIRNAME, "*.lua", VFS.RAW_FIRST)) do
    local _,_,name = string.find(v, ".*\\(.*).lua")
    if name ~= 'current' and name:sub(1,1):upper() == name:sub(1,1) then
        ...
My guess would be that it is failing because the path has no backslashes, replace the "\\" with "[\\\/]" and it should work.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Iceui Crash

Post by kalda341 »

Thanks, that fixed it.
Post Reply

Return to “Lua Scripts”