Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 6 7 8 9 10 … 18 Next »
Possible dependency bug
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Possible dependency bug
02-07-2017, 04:07 PM,
#1
esitee Offline
you know
****
Posts: 60
Threads: 9
Joined: Dec 2014
Bug  Possible dependency bug
Hello everyone!

While working on my new mainframe, I've noticed a interesting (possible) bug with the dependency of 2 libs. I tried to include both of them via dependency directly in the server environement. Both libs basically included some tables with data. The strange part now was that I could use the contents of the first lib perfectly fine, but the second lib's tables weren't recognized at all (nil error). Both libs were located on the exact same path of my shared folder, with the same permissions set on them. Furthermore the paths and names were written perfectly fine, so everything was ok there.

Here's the example code I used at first:

--@dependency STEAM_0:1:68201847 lib/FirstLib.txt sv 
--@dependency STEAM_0:1:68201847 lib/SecondLib.txt sv

if SERVER then
print( TableFromFirstLib[1] ) --This would print entry one
print( TableFromSecondLib[1] ) --This would error the chip with the message that the table itself is nil
end

Anyhow, after Yuri thought it may be intentional, I tried a different version and it worked:


--@dependency STEAM_0:1:68201847 lib/FirstLib.txt sv 
--@dependency STEAM_0:1:68201847 lib/SecondLib.txt

if SERVER then
require( "lib/SecondLib.txt" )
print( TableFromFirstLib[1] )
print( TableFromSecondLib[1] ) --Now both printed out the correct String's with no error
end

I did check the sf-helper and the tutorial in case there would have been anything to clear this up, but there wasn't.

So is this a bug, was it intentional or did I just misunderstood how the whole dependency system works?

[Image: ldkcVkq.jpg]
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Possible dependency bug - by esitee - 02-07-2017, 04:07 PM
RE: Possible dependency bug - by Person8880 - 02-07-2017, 05:46 PM
RE: Possible dependency bug - by esitee - 02-07-2017, 06:25 PM
RE: Possible dependency bug - by Person8880 - 02-07-2017, 06:55 PM
RE: Possible dependency bug - by esitee - 02-07-2017, 07:36 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.