Warp Drive Machine


You are in relative control of a spacecraft equipped with a warp drive that distorts the shape of the space-time continuum and may travel at speeds greater than that of light by many orders of magnitude. Jump from planet to planet and extract most resources you can to rebuild you ship. Each planet is unique with its own challenges, and you can stay limited time on it, until spaceship warps toward another world.

Overhaul
17 hours ago
1.1 - 2.0
3.59K

b [0.2.2]Double-"except" remove bug in item_prices.lua

5 months ago
(updated 5 months ago)

In file "item_prices.lua" Line 551, there is a bug:

    for y=1,#except do 
    if string.find(opt[x].name,except[y]) then table.remove(opt,x) end end
    end

When there is more than one except, there is a risk of an error. example: except[1] is found, so opt,x is removed. OK.... -> y=2, opt[x] is nil because it has been removed, opt[x].name <-----
Error while running event Warp-Drive-Machine::on_nth_tick(30)
Warp-Drive-Machine/item_prices.lua:551: attempt to index field '?' (a nil value)

;_;

Fix, break after remove. It has been removed, stop checking:
if string.find(opt[x].name,except[y]) then table.remove(opt,x) break end end

5 months ago

thanks Honktown.

5 months ago

Thank you. Sorry I don't know which mod(s) caused it.

New response