Author Topic: XGUI Problems  (Read 1782 times)

0 Members and 1 Guest are viewing this topic.

Offline Tusky

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
XGUI Problems
« on: April 16, 2016, 08:15:21 AM »
Alright, I have been coding and suddenly when I add ULX and ULib, it responds and says that XGUI is offline. Huge problem as this stops lots of access a admin needs. In my server console I get this message...
Code: [Select]
[ERROR] addons/ulx/lua/ulx/end.lua:57: attempt to index a string value with bad key ('red' is not part of the string library)
  1. error - [C]:-1
   2. __index - lua/includes/extensions/string.lua:310
    3. fn - addons/ulx/lua/ulx/end.lua:57
     4. fn - addons/ulx/lua/ulx/end.lua:139
      5. unknown - addons/ulib/lua/ulib/shared/hook.lua:110
Please help, as i do not know why red is invalid but on that line, row.green and row.blue can work.

Code: [Select]
local color = Color( tonumber( row.red ) or ULib.DEFAULT_TSAY_COLOR.r, tonumber( row.green ) or ULib.DEFAULT_TSAY_COLOR.g, tonumber( row.blue ) or ULib.DEFAULT_TSAY_COLOR.b )Whats wrong?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: XGUI Problems
« Reply #1 on: April 16, 2016, 12:43:42 PM »
Choking on a string where it expects a table key or number.
You've not posted enough code really for precise assistance, but it's choking on this individually.
Lua sees it as a string. You/we expect it to be a table.
Code: [Select]
Color( tonumber( row.red ) Go further into your code and see what/where row.red is being assigned.
It's not even necessarily guaranteed it's in YOUR code, but start with that.
 Likely a string assignment syntax error somewhere.

The fact that it's breaking ULib or ULX seems pretty big though.
Are you sure you're not getting errors on server startup in server console, or player console on connect/lua initialization?
« Last Edit: April 16, 2016, 12:45:20 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Tusky

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: XGUI Problems-JamminR
« Reply #2 on: April 16, 2016, 12:52:07 PM »
Ok, JamminR, I have searched around and just learned a little trick. What I did was simply go to garrysmod/data and simply deleted the ulx and ulib data. then I want to garrysmod/addons and deleted the ulx and ulib addon. Then I reinstalled it, it seemed to work. There must had been something I had installed breaking it, or simply I broke something. Thank you anyways JamminR! I love the ULX addon on my server very much!

Garrysmod Developer,
Tusky

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: XGUI Problems
« Reply #3 on: April 17, 2016, 02:09:12 PM »
For future users stumbling upon this post, it's very likely that the CLIENT's data/ulx/xgui.txt file got some bad data in it. Fixing/Removing that particular file should be enough to resolve the issue.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6