Skip to main content
Skip to main content

AIMessageErrorCouldNotPrepare

AIMessageErrorCouldNotPrepare

Parent

AIMessage

Functions

getMessage

Description

Definition

getMessage()

Arguments

anyjob

Code

function AIMessageErrorCouldNotPrepare:getMessage(job)
local i18nText = self:getI18NText()
local vehicleName = ""
if self.vehicle ~ = nil then
vehicleName = self.vehicle:getName()
end

local helperName = "Unknown"
if job ~ = nil then
helperName = job:getHelperName() or helperName
else
--#debug Logging.warning("AIMessageErrorCouldNotPrepare:getMessage() job was nil")
--#debug printCallstack()
end

return string.format(i18nText, helperName, vehicleName)
end

new

Description

Definition

new()

Arguments

anyvehicle
anycustomMt

Code

function AIMessageErrorCouldNotPrepare.new(vehicle, customMt)
local self = AIMessage.new(customMt or AIMessageErrorCouldNotPrepare _mt)

self.vehicle = vehicle

return self
end

readStream

Description

Definition

readStream()

Arguments

anystreamId
anyconnection

Code

function AIMessageErrorCouldNotPrepare:readStream(streamId, connection)
self.vehicle = NetworkUtil.readNodeObject(streamId)
end

writeStream

Description

Definition

writeStream()

Arguments

anystreamId
anyconnection

Code

function AIMessageErrorCouldNotPrepare:writeStream(streamId, connection)
NetworkUtil.writeNodeObject(streamId, self.vehicle)
end