Author Topic: Playing sounds through ulx  (Read 7401 times)

0 Members and 2 Guests are viewing this topic.

AKAaimpro

  • Guest
Playing sounds through ulx
« on: May 05, 2016, 08:22:04 PM »
My ULib/ULX versions:
ULib v2.60
ULX v3.70

Game mode(s) I am having this problem on: terrortown (Trouble in Terrorist Town)

Lua errors shown in console:
Code: [Select]
[LC ULib ERROR] Received invalid sound

I'm having trouble adding sounds to my server through ULX. I've added all my sound files to the FastDL.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Playing sounds through ulx
« Reply #1 on: May 05, 2016, 09:01:09 PM »
Is the sound also on your server? Are you putting in the correct path when you run the command?

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Playing sounds through ulx
« Reply #2 on: May 05, 2016, 09:01:46 PM »
Very unlikely this is ULib's fault. To narrow down the possible causes we're going to need more info:

What sound are you trying to play? What exact command (command and any arguments) did you run to try to play the sound?
In what folder is that sound located on the server (Garry's Mod Server, not FastDL)?
In what folder is that sound located on FastDL?
Check your local Garry's Mod download folder (C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\download) and see if the sound file exists there.

I believe ULib only checks serverside to see if the sound exists, so the extra checks to verify that FastDL is working aren't necessary, but better to double check.

edit: ninja'd
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

AKAaimpro

  • Guest
Re: Playing sounds through ulx
« Reply #3 on: May 05, 2016, 09:56:03 PM »
I ran the command both through the xgui and console(client side and server side).
The sound folder is located in the /garrysmod/sound
The FastDL is web synced through my server provider and has resource.lua under /lua/autorun
« Last Edit: May 07, 2016, 08:49:38 PM by AKAaimpro »

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Playing sounds through ulx
« Reply #4 on: May 06, 2016, 10:50:48 AM »
Please tell us the exact path to your sound and the full command you entered.

e.g. sound path is "garrysmod\sounds\mysounds\sound.mp3", command entered was ulx sound via xgui supplied with "sound.mp3" as the argument
(note: this example is not necessarily the correct usage of the command)
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

AKAaimpro

  • Guest
Re: Playing sounds through ulx
« Reply #5 on: May 06, 2016, 03:42:24 PM »
The path for the sound is "garrysmod/sound/sound.mp3".
« Last Edit: May 07, 2016, 08:49:01 PM by AKAaimpro »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Playing sounds through ulx
« Reply #6 on: May 06, 2016, 06:05:27 PM »
And exactly what are you typing, in XGUI, or console, to try to play that sound?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

AKAaimpro

  • Guest
Re: Playing sounds through ulx
« Reply #7 on: May 07, 2016, 12:49:23 AM »
ulx playsound sound.mp3
« Last Edit: May 07, 2016, 08:50:06 PM by AKAaimpro »

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: Playing sounds through ulx
« Reply #8 on: May 07, 2016, 12:53:08 AM »
Both
ulx playsound /ulx/sound.mp3
ulx playsound ulx/sound.mp3

Try just "ulx playsound sound" also does it work when you pass it to the built in Garrysmod "play" command?
I cry every time I see that I am not a respected member of this community.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Playing sounds through ulx
« Reply #9 on: May 07, 2016, 08:04:29 AM »
If garrysmod/sound/ulx/sound.mp3 exists on the server, "ulx playsound ulx/sound.mp3" should not say "That sound doesn't exist on the server!". Unless your ULX or ULib installation is corrupt in some way, the only reason it wouldn't work is because garrysmpd/sound/ulx/sound.mp3 doesn't actually exist. How did you upload the file? Does your server host give you direct FTP access, or only through a webpanel?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Playing sounds through ulx
« Reply #10 on: May 07, 2016, 12:15:19 PM »
With that error, it means that you have the sound on the server, but not on the client. Double check your fastdl config.
Experiencing God's grace one day at a time.

AKAaimpro

  • Guest
Re: Playing sounds through ulx
« Reply #11 on: May 07, 2016, 09:19:37 PM »
Oh, I had messed a string up in the resource.lua folder causing the sound file not to force download to the client. It works now thanks!