Ulysses
General => Developers Corner => Topic started by: bender180 on May 21, 2013, 09:00:18 AM
-
Sorry that this isnt ulx/ulib related not sure what the rule on that is but ive been trying to convert a gmod 12 addon to work with 13 ive been using this guide https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA and i cant figure out why this
local HoverboardTypes = util.KeyValuesToTable(file.Read("hoverboard/hoverboards.txt", "DATA"))
is returning this
[ERROR] addons/hoverboard/lua/weapons/gmod_tool/stools/hoverboard.lua:9: bad argument #1 to 'KeyValuesToTable' (string expected, got no value)
Im just using file.Read for the first time so sorry if its something stupid.
-
does garrysmod/data/hoverboard/hoverboards.txt exist?
If it does, does it have anything in it?
-
Does the file exist in data/hoverboard/hoverboards.txt? Does it have content?
Or so I was going to say, before Mr. P beat me to the punch. Guess that's the trouble of leaving tabs open for a while. I'm glad that Mr. P and I agree completely on how to debug the issue, though. :P
-
the file is in the addon folder so \garrysmod\garrysmod\addons\hoverboard\data\hoverboard\hoverboards.txt i havent check the contents of that file yet so it might be the file isnt compatible with 13.
-
Move the file out of the addons folder into the raw data folder.
I think garry still hasn't fixed his issues with file.Read not reading from the addons folder completely yet.
-
alright ill give that a try but since addons are virtual would the game not consider it in the data folder already?
-
It should.. but what happens is the engine prioritizes or something like that, so it will not see it there. I think ULX was having those issues before they wrote their own I/O library.
-
You are indeed running into gmod's file reading bug there, bender. We have it documented here (https://github.com/Nayruden/Ulysses/issues/185).
-
Ah i see thanks.