Kraxie Posted September 27, 2015 Posted September 27, 2015 Hello! 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. Suggestions? Thanks! Quote Windows 7 | Intel Core i7-4790K | 16 GB RAM | Nvidia GTX 980
Slastraf Posted September 27, 2015 Posted September 27, 2015 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 self.camera:SetFOV(20) end 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. Quote
Kraxie Posted September 27, 2015 Author Posted September 27, 2015 Actually, just found the issue, I just renamed my App.lua to Main.lua and it's all good now Quote Windows 7 | Intel Core i7-4790K | 16 GB RAM | Nvidia GTX 980
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.