Jump to content

THUI doesn't work after update


tomis13lack
 Share

Recommended Posts

I haven't worked on my game in a while. When i went onto it it said it needed updated. I updated it and now the game will not run. It gives this error: 

Quote

"C:/Users/admin/Documents/Leadwerks/Projects/game2/Addons/THUI/Core.lua" : 61 : bad argument #1 to 'insert' (table expected, got nil)

No changes had been made since and it ran fine then. Only one map is still able to run, but the map isn't functioning properly as everything is black. When run in debug mode it says 0 polygons, etc. (0 everything)

this game was last updated in april of this year.

 

I am assuming this is because of the thui update, but i am not sure where i would be able to find the revisions i would have to make.

Link to comment
Share on other sites

3 minutes ago, DoomSlayer said:

I also use THUI and its working fine.

The update most likely changed your main.lua so you need to modify your main.lua again to work with thui.

To make sure, try to find in your main.lua:


import "Addons/THUI/THUI.lua"

 

you say it most likely changed it. Does this mean it will have entirely reverted it? Will i have to rewrite things i put in there?

i did have to add the line again but same error.

Link to comment
Share on other sites

I think i should also add: 

old: 

local windowstyle = Window.Resizable+Window.Titlebar
if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+Window.FullScreen end
window=Window:Create(title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","768"),windowstyle)
window:HideMouse()

new:

local windowstyle = 0
local winwidth
local winheight

 

there seem to be a lot of new local variables and stuff and i am not sure the usage. Is there anything i should keep?

Edit: Also, i added in thui initialize and the import and it runs now, but thui isn't working. When you go to anything that would open up a menu, all effects occur except the menu itself. Game gets paused and everything but no options.

Edit 2: Forgot thui update. that is fixed. 

Link to comment
Share on other sites

14 hours ago, tomis13lack said:

I got everything fixed except one thing. Thui appears now and everything but the mouse is still locked when this happens. This problem did not occur before. Also if you click on some of the buttons the game crashes

It sounds like you are missing some of the other changes to Main.lua. Take a look at this my THUI thread, verify that steps 1-5 have been completed properly in your Main.lua file. These changes will get reverted every time there is an update to the stock Main.lua so you will need to check after every update, I wish this wasn't the case but c'est la vie.

 

Link to comment
Share on other sites

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.

Guest
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.

 Share

×
×
  • Create New...