• Print

Author Topic: ULib won't load  (Read 10378 times)

0 Members and 1 Guest are viewing this topic.

Lunchbox

  • Guest
ULib won't load
« on: November 19, 2006, 08:20:52 am »
Just set up a Linux dedicated server with ULib and ULX.
I followed the instructions very carefully, but upon launching the server I'm greeted with errors (excerpt):

Lua Script: init/ulib_init.lua
Lua Error: Line 12: attempt to call field 'print' (a nil value)
LUA: Errors when running script 'init/ulib_init.lua'

ULX won't load at all.
I tried commenting out line 12 and it gave me another error on line 10 about comparing something to nil.

Since line 10 is the openscript line for ulib it seems like it isn't loading ULib (can't find it perhaps?).

My directory structure is as follows.
/apps/games/srcds/gmod9/lua/ULib
/apps/games/srcds/gmod9/lua/ULX
/apps/games/srcds/gmod9/lua/init/ulib_init.lua

I'm using the newest versions from your homepage (v2.21 ULX and v1.2 ULib I believe).

Any ideas?

Thanks in advance.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULib won't load
« Reply #1 on: November 19, 2006, 12:44:21 pm »
The code in question...
Code: Lua
  1. --[[
  2.         Title: ULib Main Init
  3.  
  4.         This file is here so ULib will load modules properly. Notice, it *only* loads ULib if there are modules.
  5. ]]
  6.  
  7. files = _file.Find( "lua/ULib/modules/*.lua" )
  8. if table.getn( files ) ~= 0 then
  9.         _OpenScript( "ULib/init.lua" )
  10.        
  11.         for _, file in ipairs( files ) do
  12.                 ULib.print( "[ULIB] Loading module: " .. file )
  13.                 _OpenScript( "ULib/modules/" .. file )
  14.         end
  15. end

As you can see, it attempts to load ULib first, and then uses a ULib function. For some reason, I guess I forgot to include better error checking in here... but your error is almost certainly that it's unable to load ULib/init.lua.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULib won't load
« Reply #2 on: November 19, 2006, 12:49:50 pm »
Sheesh. I just realized its been about 7 months since I booted into Linux.
Let me boot into it and see if I can reporoduce the error.
I'll warn you, I probably have many system updates to download first.
I'll report back. Give me ~4 hours. Its 3:45pm EST US now.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Lunchbox

  • Guest
Re: ULib won't load
« Reply #3 on: November 19, 2006, 02:51:41 pm »
@JamminR
Thanks for the help I really appreciate it.

@Megiddo
Yeah I agree, I'll try a bit more debugging.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULib won't load
« Reply #4 on: November 19, 2006, 02:52:46 pm »
194 system updates later...
Lunchbox, I just ran the latest ULib and ULX on the latest linux srcds package.

I don't know if it would help, but the script I use to start my srcds linux server manually rebuilds the modcache folder.
I don't really have any more ideas for you at this time, except to make sure all your folders are the same case (lower or upper) that the ULib and ULX rar files have them in.
From the folder paths you've shown, it seems to be the same.
Have you tried going so far as to remove your lua/ULib and lua/ULX folders, lua/init/ulx_init (if you have one) file, then extracting the rar files again?

As part of your debugging, might try, from the actual server console, loading ULib manually, see if you get any 'helpful' errors.
lua _OpenScript( "ULib/init.lua" )

(Edit - use lua _openscript, sorry)


« Last Edit: November 19, 2006, 06:30:26 pm by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Lunchbox

  • Guest
Re: ULib won't load
« Reply #5 on: November 19, 2006, 09:53:59 pm »
@JamminR
I took your advice and ran the "lua _OpenScript( "ULib/init.lua" )" command and was greeted with nothing, nothing at all.
It didn't crash, it just ran the line and started accepting commands again.  I tried running the ULX script next, but it gave a bunch of errors about not being able to run a bunch of ULib functions.

This warrants further investigation.  I will try some more tomorrow.

Thanks for your help so far!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULib won't load
« Reply #6 on: November 20, 2006, 06:17:42 am »
What distro are you using Lunchbox?
Experiencing God's grace one day at a time.

Lunchbox

  • Guest
Re: ULib won't load
« Reply #7 on: November 20, 2006, 03:13:09 pm »
I'm using the newest current tree from Arch Linux (my personal favorite distro).

I've had class and work today and will not be able to work on it until after 8:00PM EST.

It's really become quite the interesting dilemma.
I've actually uninstalled and reinstalled both ULib and ULX and I'm still getting the same error.

I really appreciate you guys helping me like this.
I Will try more later.

Thanks again,
Lunchbox

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULib won't load
« Reply #8 on: November 20, 2006, 03:51:27 pm »
Lunchbox,
When you ran the command, there were no 'blah loaded' responses in your console?
You did run this in the srcds game console, not just an xterm console, yes?

Did you follow the Linux Ded Server 'how to' from Facepunchstudios Gmod9 Help and Support forum to install your ded server?
http://forums.facepunchstudios.com/showthread.php?t=231860
It's what I used.
The only deviations I've made are in my startup script. Mine is a bit more complicated.

If not, what/where did you go for help?
I'm really interested to know if your install has all the latest version linux steam/srcds, etc files, and the install instructions from facepunch verify that you do, at least upon first install.
It also has several fixes that are linux specific.

You _are_ running srcds in native linux mode, and not a Windows version in Cedega/Wine, right?
(Don't slap me for asking such a question that might offend a true hardcore linux user :P)

Has any previous version of ULib and/or ULX worked for you before, or is this a first time for attempting to run them?

Is your gmod9 server running ok, but just without ULib?

Ok, info overload for now. I'll let you go back to troubleshooting
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Lunchbox

  • Guest
Re: ULib won't load
« Reply #9 on: November 20, 2006, 04:29:11 pm »
Lunchbox,
Quote
When you ran the command, there were no 'blah loaded' responses in your console?
You did run this in the srcds game console, not just an xterm console, yes?
No, there were no responses unfortunately.

Quote
Did you follow the Linux Ded Server 'how to' from Facepunchstudios Gmod9 Help and Support forum to install your ded server?
http://forums.facepunchstudios.com/showthread.php?t=231860
I used that very guide actually.

Quote
I'm really interested to know if your install has all the latest version linux steam/srcds, etc files, and the install instructions from facepunch verify that you do, at least upon first install.
I wrote a custom startup script as well that makes sure the server is up to date on launch.

Quote
You _are_ running srcds in native linux mode, and not a Windows version in Cedega/Wine, right?
(Don't slap me for asking such a question that might offend a true hardcore linux user )
Haha, no its native.

Quote
Has any previous version of ULib and/or ULX worked for you before, or is this a first time for attempting to run them?
This is my first install.

Quote
Is your gmod9 server running ok, but just without ULib?
Yes, it's running fine and even has some other lua scripts running like iRobot v3, VMFcopy, VMFloader.

Quote
Ok, info overload for now. I'll let you go back to troubleshooting
I'll get back to troubleshooting here in an hour or so when I have some more free time.

Thanks again!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULib won't load
« Reply #10 on: November 20, 2006, 05:18:47 pm »
If you haven't already, try running without any other lua scripts?
Just init.lua and ULib_init.lua in your /init folder. Make sure init.lua is original. Mine is exactly 942 bytes in size according to my Nautilus file browser.

I'm at a loss of where else to go.
Just the fact you get no response when attempting to use "lua _OpenScript" is odd in itself.
I was going to guess about other lua not running, until you said your other scripts run.

Do you use any type of lua 'anti-virus'? Pointless really on a ded-server, but if you've copied it over from a Windows Gmod9 folder, perhaps it would stop Ulib from running, somehow.

Thats the only other ideas I can think of at this time.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Lunchbox

  • Guest
Re: ULib won't load
« Reply #11 on: November 20, 2006, 08:11:31 pm »
@JamminR
Well... don't I just feel like a tool...

After you said run it without other scripts I realized that I installed all of them at the same time.
I ran it vanilla first and then with all scripts installed.

I removed all the scripts except the original init.lua, ulib_init.lua, and ULib/modules/ulx_init.lua and whadda ya know; it works.
I'm going to put all the scripts back in one at a time and see which one is the culprit.

Thanks for all your help and sorry for being a dummy...

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULib won't load
« Reply #12 on: November 20, 2006, 08:15:02 pm »
Lunchbox, no problem.
If you could let us know which one 'breaks' it, we sure would appreciate knowing.
Might be able to figure out a work around too.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Lunchbox

  • Guest
Re: ULib won't load
« Reply #13 on: November 20, 2006, 08:19:42 pm »
Followup:
It was the VMFCopyGun script that I was running out of /init that was killing the server.
iRobotv3 and swep_menu run fine from there.

[this may be off topic but I'm curious]
What is the proper way to install the VMFCopyGun script onto the server?
Should I run it out of /ULib/modules?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULib won't load
« Reply #14 on: November 20, 2006, 08:30:42 pm »
Hmmm, I'm pretty sure that I was told (or experienced first hand) that linux loads init files in reverse alphabetical order. Try renaming 'zzzPropProtector.lua' to 'aaaPropProtector.lua'. Prop protector is very picky about being loaded last.
Experiencing God's grace one day at a time.

  • Print