Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on functions - update error #5

Closed
LoogleCZ opened this issue Aug 6, 2018 · 0 comments
Closed

Turn on functions - update error #5

LoogleCZ opened this issue Aug 6, 2018 · 0 comments
Assignees

Comments

@LoogleCZ
Copy link
Owner

LoogleCZ commented Aug 6, 2018

Problem

While trying to to update status of turn on buttons, game will produce this error:

Error: Running LUA method 'draw'.
xxx/actionFunction.lua:195: attempt to call method 'getIsTurnedOn' (a nil value)

Code that produces error:

for _,implement in pairs(implements) do
if implement.object ~= nil then
status = implement.object:getIsTurnedOn() or status;
end;
end;

TODO:

  • add condition implement.object.getIsTurnedOn ~= nil before calling that function.
  • check all update and action functions if they check that functions before calling it
@LoogleCZ LoogleCZ self-assigned this Aug 7, 2018
LoogleCZ added a commit that referenced this issue Aug 7, 2018
This code review was based on critical issue #5
Based on that review, some conditions was updated
LoogleCZ added a commit that referenced this issue Aug 11, 2018
See changelog for list of changes from version 4.0.4
This release officialy closes these issues:
Close #1 - Fix camera on outside IC
Close #2 - Vehicle's IC could be activated from attacher vehicle
Close #4 - Possibility to save toggle style
Close #5 - Update error when using turn on functions
Close #6 - Network communication

Network communication was completely tested by Adam Maršík
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant