DogukanUcan Posted July 30, 2019 Share Posted July 30, 2019 original killmessages debug error how fix? function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end Link to comment
JeViCo Posted July 31, 2019 Share Posted July 31, 2019 Hi, @DogukanUcan, your screenshot doesn't work anymore. Could you reupload it so we can help you Link to comment
DogukanUcan Posted July 31, 2019 Author Share Posted July 31, 2019 @JeViCo Debug: ERROR: killmessages\gui.Lua:234:bad argument #1 to 'ipairs'(table expected,got nil) Link to comment
JeViCo Posted July 31, 2019 Share Posted July 31, 2019 So contentMessages[line] is nil so line variable is nil as well try to find destroyLine function call in your code Link to comment
DogukanUcan Posted August 23, 2019 Author Share Posted August 23, 2019 function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end what should i do here? Link to comment
Moderators IIYAMA Posted August 23, 2019 Moderators Share Posted August 23, 2019 (edited) 7 minutes ago, DogukanUcan said: function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end what should i do here? The very reason for the error is unclear. Because the issue is happening somewhere else. This is how you can get rid of the error, for this function only. function destroyLine ( line ) if contentMessages[line] then -- is there a `line` to destroy? for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} return true -- success < not required, but it might help you in the future solve the real issue. end return false -- something is wrong? end Edited August 23, 2019 by IIYAMA Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now