Adamus Posted March 23 Share Posted March 23 (edited) 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. Edited March 23 by Adamus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now