Code: Select all
Fatal: [string "[T] @libs/SpaceStation.lua"]:144: attempt to index field '?' (a nil value)
stack traceback:
[string "[T] @libs/SpaceStation.lua"]:144: in function 'GetEquipmentStock'
[string "[T] @modules/crashongetstock.lua"]:9: in function 'cb'
[string "[T] @libs/Event.lua"]:34: in function '?'
[string "[T] @libs/Event.lua"]:185: in function <[string "[T] @libs/Event.lua"]:180>==9903== Syscall param writev(vector[...]) points to uninitialised byte(s)
Code: Select all
local Comms = require 'Comms'
local Event = require 'Event'
local Equipment = require 'Equipment'
local ui = require 'pigui'
local onShipDocked = function (ship, station)
if ship:IsPlayer() then
Comms.Message("Number of ECM units in stock: " ..
station:GetEquipmentStock(Equipment.misc.ecm_basic))
end
end
Event.Register("onShipDocked", onShipDocked)