• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Module (a nil value)

Helliot1

Owner of Empire Online
Joined
Jul 26, 2017
Messages
315
Solutions
1
Reaction score
58
Hello everybody,

I have a error in my terminal, and I can't get solve this.

Terminal

Code:
ERROR: protected lua call failed: LUA ERROR:
/client_entergame/entergame.otui:142: [@onClick]:2: attempt to index field 'client_about' (a nil value)
stack traceback:
    [C]: in function '__index'
    /client_entergame/entergame.otui:142: [@onClick]:2: in function </client_entergame/entergame.otui:142: [@onClick]:1>


Entergame.otui
Where is " @onClick: modules.client_about.show()" is the line 142.

Code:
  LoginButton
    id: optionsButton
    !text: tr('Options')
    font: verdana-11px-rounded
    height: 27
    width: 117
    anchors.left: HorizontalSeparator.left
    anchors.top: HorizontalSeparator.bottom
    margin-top: 10
    @onClick: modules.client_options.show()

  LoginButton2
    id: aboutButton
    !text: tr('About')
    font: verdana-11px-rounded
    height: 27
    width: 117
    anchors.left: optionsButton.right
    anchors.top: optionsButton.top
    margin-left: -1
    @onClick: modules.client_about.show()

  LoginButton2
    id: accountButton
    !text: tr('New Account')
    font: verdana-11px-rounded
    color: #82ff32
    height: 27
    width: 117
    anchors.left: aboutButton.right
    anchors.top: aboutButton.top
    margin-left: -1

What's wrong?
 
Solution
Hello everybody,

I have a error in my terminal, and I can't get solve this.

Terminal

Code:
ERROR: protected lua call failed: LUA ERROR:
/client_entergame/entergame.otui:142: [@onClick]:2: attempt to index field 'client_about' (a nil value)
stack traceback:
    [C]: in function '__index'
    /client_entergame/entergame.otui:142: [@onClick]:2: in function </client_entergame/entergame.otui:142: [@onClick]:1>


Entergame.otui
Where is " @onClick: modules.client_about.show()" is the line 142.

Code:
  LoginButton
    id: optionsButton
    !text: tr('Options')
    font: verdana-11px-rounded
    height: 27
    width: 117
    anchors.left: HorizontalSeparator.left
    anchors.top: HorizontalSeparator.bottom...
Look at the lua not the otui

I don't found anything wrong in lua...

Lua:
local aboutWindow

function init()
  aboutWindow = g_ui.displayUI('about')
  aboutWindow:open()
  aboutWindow:disableResize()

  aboutWindow:setup()
end

function terminate()
  aboutWindow:destroy()
end

function toggle()
  if aboutWindow:isVisible() then
    hide()
  else
    show()
  end
end

function show()
  aboutWindow:show()
  aboutWindow:raise()
  aboutWindow:focus()
end

function hide()
  aboutWindow:hide()
end
 
Hello everybody,

I have a error in my terminal, and I can't get solve this.

Terminal

Code:
ERROR: protected lua call failed: LUA ERROR:
/client_entergame/entergame.otui:142: [@onClick]:2: attempt to index field 'client_about' (a nil value)
stack traceback:
    [C]: in function '__index'
    /client_entergame/entergame.otui:142: [@onClick]:2: in function </client_entergame/entergame.otui:142: [@onClick]:1>


Entergame.otui
Where is " @onClick: modules.client_about.show()" is the line 142.

Code:
  LoginButton
    id: optionsButton
    !text: tr('Options')
    font: verdana-11px-rounded
    height: 27
    width: 117
    anchors.left: HorizontalSeparator.left
    anchors.top: HorizontalSeparator.bottom
    margin-top: 10
    @onClick: modules.client_options.show()

  LoginButton2
    id: aboutButton
    !text: tr('About')
    font: verdana-11px-rounded
    height: 27
    width: 117
    anchors.left: optionsButton.right
    anchors.top: optionsButton.top
    margin-left: -1
    @onClick: modules.client_about.show()

  LoginButton2
    id: accountButton
    !text: tr('New Account')
    font: verdana-11px-rounded
    color: #82ff32
    height: 27
    width: 117
    anchors.left: aboutButton.right
    anchors.top: aboutButton.top
    margin-left: -1

What's wrong?
If there is a client_about module directory then make sure you have otmod for it set up correctly and also it is linked within modules/client/client.otmod.
 
Solution
Back
Top