Skip to content

Commit

Permalink
Fix mesecon variable bug caused by f3bc9d7
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Aug 12, 2016
1 parent 4391d23 commit 7d6132e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ end
dofile(boost_cart.modpath.."/functions.lua")
dofile(boost_cart.modpath.."/rails.lua")

if minetest.global_exists(mesecon) then
local HAVE_MESECONS_ENABLED = minetest.global_exists("mesecon")
if HAVE_MESECONS_ENABLED then
dofile(boost_cart.modpath.."/detector.lua")
end

Expand Down Expand Up @@ -279,7 +280,7 @@ function boost_cart.cart:on_step(dtime)
new_acc = vector.multiply(dir, acc)
end

if mesecon then
if HAVE_MESECONS_ENABLED then
boost_cart:signal_detector_rail(vector.round(pos))
end

Expand Down

3 comments on commit 7d6132e

@VanessaE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related?

2016-08-13 18:22:12: ERROR[Main]: ServerError: Lua: Runtime error from mod 'boost_cart' in callback luaentity_Step(): ...World/worldmods/dreambuilder_modpack/boost_cart/init.lua:283: attempt to call method 'signal_detector_rail' (a nil value)
2016-08-13 18:22:12: ERROR[Main]: stack traceback:
2016-08-13 18:22:12: ERROR[Main]:       ...World/worldmods/dreambuilder_modpack/boost_cart/init.lua:283: in function <...World/worldmods/dreambuilder_modpack/boost_cart/init.lua:159>

@SmallJoker
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HEAD does not contain a method in init.lua:283. Update your local repository.

@VanessaE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see what went wrong. Local repo was up-to-date, but did not get copied to its usual location.

Please sign in to comment.