DogukanUcan Posted July 30, 2019 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
JeViCo Posted July 31, 2019 Posted July 31, 2019 Hi, @DogukanUcan, your screenshot doesn't work anymore. Could you reupload it so we can help you
DogukanUcan Posted July 31, 2019 Author Posted July 31, 2019 @JeViCo Debug: ERROR: killmessages\gui.Lua:234:bad argument #1 to 'ipairs'(table expected,got nil)
JeViCo Posted July 31, 2019 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
DogukanUcan Posted August 23, 2019 Author 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?
Moderators IIYAMA Posted August 23, 2019 Moderators 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
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