• Youtube Audio Player throwing out errors and not working.
    5 replies, posted
Hello, I here 2 scripts that add a menu into ULX to play sounds from youtube videos. Everything appears to work fine, until I enter a URL for it to play. At that point, the player does not do anything but throw out an error. So I come here for help as the members of this forum are extremely knowledgeable and crafty as far as I know. These scripts seem quite large to me, so I will do you the favor of showing you the error so you don't need to scan all of it. Error: [code] [ERROR] addons/ulx/lua/ulx/modules/cl/youtube_music_player_cl.lua:129: attempt to call field 'Get' (a nil value) 1. unknown - addons/ulx/lua/ulx/modules/cl/youtube_music_player_cl.lua:129 Timer Failed! [Simple][@addons/ulx/lua/ulx/modules/cl/youtube_music_player_cl.lua (line 127)] [/code] Script 1: addons/ulx/lua/ulx/modules/cl/[B]youtube_music_player_cl.lua[/B] [URL="http://pastebin.com/SNerWWsc"]http://pastebin.com/SNerWWsc[/URL] Script 2: addons/ulx/lua/ulx/modules/sh/[B]youtube_music_player_sh.lua[/B] [URL="http://pastebin.com/wxvXzBzx"]http://pastebin.com/wxvXzBzx[/URL] If anyone could point me into the right direction, or better yet a working youtube audio player than can be used in the murder gamemode, please help me out. Thanks
http.Get was removed. Use http.Fetch instead. But as far as I remember, that addon is quiet old so you might need to fix some more stuff.
Can I get the link to the addon/script? I want to practice updating addons and I would like to give this a shot
[QUOTE=Leystryku;44396703]http.Get was removed. Use http.Fetch instead. But as far as I remember, that addon is quiet old so you might need to fix some more stuff.[/QUOTE] Alright thanks for this. I'll look into it more. [QUOTE=AnonTakesOver;44396857]Can I get the link to the addon/script? I want to practice updating addons and I would like to give this a shot[/QUOTE] There was no solid link for this. After about 20 minutes of looking for an addon that found youtube audio, I came across an FTP setup type site. Had to create the files in the specified folders to get this to "work". [URL="http://ulx-youtube-jukebox.googlecode.com/svn/trunk/lua/ulx/modules/"]http://ulx-youtube-jukebox.googlecode.com/svn/trunk/lua/ulx/modules/[/URL]
Alright works nicely. Just puts out some script errors but what can you do. Thing is, only SOME people can hear it play, and it also gives this new error in console that I don't understand. [code][ERROR] lua/includes/modules/http.lua:34: attempt to call upvalue 'onsuccess' (a string value) 1. unknown - lua/includes/modules/http.lua:34 [/code] Can anyone help me out here?
The syntax of http.Fetch is a bit different from the one of http.Get. [url]http://wiki.garrysmod.com/page/http/Fetch[/url] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index80e6.html[/url]
Sorry, you need to Log In to post a reply to this thread.