Jump to content

Adamus

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Adamus

  1. I am working on a mod and trying to execute the following function:

    Quote

    function createDeathMail()
        local player = Player()
        local mail = Mail()
        x, y = Sector():getCoordinates()
        mail.text = Format("Sector %1%:%2% will be destroyed by the Xsotan. You must immediately evacuate.\n\nBest wishes, Space Association"%_t, x, y)
        mail.header = "Xsotan Report"%_T
        mail.sender = "Space Association"%_T
        mail.receiver = player.id
        mail.id = "Xsotan"
        player:addMail(mail)
    end

    I get a error in logs: attempt to index local 'player' (a nil value).  I'd really appreciate any advice on this.

×
×
  • Create New...