Jump to content

[Solved] Attempt to index field 'window' (a nil value)?

Recommended Posts



So something weird have started happening in the later updates. It now instantly crashes on


local mousePos = App.window:GetMousePosition()

With the error

MainMenu.lua" : 2 : attempt to index field 'window' (a nil value)

To try, I tried creating the window with

self.window = Window:Create("Window", 10, 10, 1280, 720, window.Titlebar)

Which results in the same error.




Share this post

Link to post

in main.lua: window=Window:Create(title,0,0,System:GetProperty("screenwidth","1920"),System:GetProperty("screenheight","1080"),windowstyle)


in fpsplayer:

local window = Window:GetCurrent()

if window:KeyDown(Key.Y) then




thats how it works fine with my version, the main loop is with a while loop, but I dont know if this inpacts on that.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...