• "Damagelog Menu (with RDM Manager)" Error.
    4 replies, posted
I've been trying to fix it since yesterday, the files arn't inside the ulx & ulib folders. Not sure how to fix. I haven't edited anything inside the the addon yet, >> Addon = [url]http://forums.ulyssesmod.net/index.php/topic,4992.0.html?PHPSESSID=4b0hkvfrlmmhmddaj8579q5qf3[/url] << [CODE][ERROR] addons/ulx-youtube-jukebox/lua/ulx/modules/sh/youtube_music_player_sh.lua:273: bad argument #2 to 'Exists' (string expected, got no value) 1. Exists - [C]:-1 2. unknown - addons/ulx-youtube-jukebox/lua/ulx/modules/sh/youtube_music_player_sh.lua:273 3. include - [C]:-1 4. unknown - addons/ulx/lua/ulx/init.lua:33 5. include - [C]:-1 6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2 7. include - [C]:-1 8. unknown - addons/ulib/lua/ulib/init.lua:68 9. include - [C]:-1 10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3[/CODE] "Youtube_music_player_sh.lua" code. [CODE]-- ULX YouTube Jukebox - Allows admins to play audio from YouTube videos on the server. local ulx_cmd_category = "ULX YouTube Jukebox" local current_vid = {} if CLIENT then current_vid = nil end --[[ This function attempts to find and return the video ID in a YouTube video URL. Returns nil on failure. ]] function ulx.getVideoIDFromURL( url ) if url:len() <= 0 then return end local _, v_end = url:find( "v=", 1, true ) if not v_end then return end local video_id = url:sub( v_end + 1, v_end + 11 ) -- 11 = Length of all YouTube video ID's if video_id and video_id:len() ~= 11 then return end return video_id end --[[ This function attempts to find and return the video title in data from an HTTP request for YouTube video info. Returns "<unknown_title>" on failure. ]] function ulx.getVideoTitleFromHTTPData( data ) local video_title if data:len() <= 0 then print( "ULX YouTube Jukebox: Error retrieving video title" ) video_title = "<unknown_title>" else local _, title_tag1_end = data:find( "<media:title type='plain'>", 1, true ) local title_tag2_pos = data:find( "</media:title>", title_tag1_end + 1, true ) video_title = data:sub( title_tag1_end + 1, title_tag2_pos - 1 ) video_title = ( video_title ~= nil and video_title ~= "" ) and video_title or "<unknown_title>" end return video_title end --[[ This function attempts to find and return the video length in data from an HTTP request for YouTube video info. Returns nil on failure. ]] function ulx.getVideoLengthFromHTTPData( data ) if data:len() <= 0 then return end local _, dur_start = data:find( "<yt:duration seconds='", 1, true ) local dur_end = data:find( "'/>", dur_start + 1, true ) if not dur_start or not dur_end then return end local duration = tonumber( data:sub( dur_start + 1, dur_end - 1 ) ) return duration end function ulx.play_video( calling_ply, url ) local video_id = ulx.getVideoIDFromURL( url ) if not video_id then ULib.tsayError( calling_ply, "Invalid YouTube URL", true ) return end for k,v in ipairs( player.GetAll() ) do current_vid[ v ] = video_id -- For saving videos to the server's playlist end umsg.Start( "ulx_playvid" ) umsg.String( video_id ) umsg.End() http.Fetch( "http://gdata.youtube.com/feeds/api/videos/" .. video_id .. "?v=2", "", function( contents ) local video_title = ulx.getVideoTitleFromHTTPData( contents ) ulx.fancyLogAdmin( calling_ply, "#A played YouTube video:\n#s\n#s", url, video_title ) ULib.tsay( nil, "Type !stopvid to stop it.", true ) ULib.csay( nil, "Now playing: " .. video_title, nil, 10 ) end ) end local play_video = ulx.command( ulx_cmd_category, "ulx playvid", ulx.play_video, "!playvid", true ) play_video:defaultAccess( ULib.ACCESS_ADMIN ) play_video:addParam{ type = ULib.cmds.StringArg, hint = "url" } play_video:help( "Plays audio from a YouTube video on all clients." ) function ulx.play_video_client( calling_ply, url ) local video_id = ulx.getVideoIDFromURL( url ) if not video_id then ULib.tsayError( calling_ply, "Invalid YouTube URL", true ) return end current_vid[ calling_ply ] = video_id umsg.Start( "ulx_playvid", calling_ply ) umsg.String( video_id ) umsg.End() http.Fetch( "http://gdata.youtube.com/feeds/api/videos/" .. video_id .. "?v=2", "", function( contents ) local video_title = ulx.getVideoTitleFromHTTPData( contents ) ulx.fancyLog( { calling_ply }, "#P played YouTube video client-side:\n#s\n#s", calling_ply, url, video_title ) -- Logging this way makes it only echo to the person who ran the command. ULib.tsay( calling_ply, "Type !stopvid to stop it.", true ) ULib.csay( calling_ply, "Now playing: " .. video_title, nil, 10 ) end ) end local play_video_client = ulx.command( ulx_cmd_category, "ulx playvidcl", ulx.play_video_client, "!playvidcl", true ) play_video_client:defaultAccess( ULib.ACCESS_ALL ) play_video_client:addParam{ type = ULib.cmds.StringArg, hint = "url" } play_video_client:help( "Plays audio from a YouTube video client-side." ) function ulx.stop_video_all( calling_ply, url ) umsg.Start( "ulx_stopvid" ) umsg.End() ulx.fancyLogAdmin( calling_ply, "#A stopped the YouTube video" ) end local stop_video_all = ulx.command( ulx_cmd_category, "ulx stopvidall", ulx.stop_video_all, "!stopvidall", true ) stop_video_all:defaultAccess( ULib.ACCESS_ADMIN ) stop_video_all:help( "Stops the YouTube video that's playing for everyone." ) function ulx.stop_video_client( calling_ply, url ) umsg.Start( "ulx_stopvid", calling_ply ) umsg.End() ulx.fancyLog( { calling_ply }, "#P stopped the YouTube video client-side", calling_ply ) end local stop_video_client = ulx.command( ulx_cmd_category, "ulx stopvid", ulx.stop_video_client, "!stopvid", true ) stop_video_client:defaultAccess( ULib.ACCESS_ALL ) stop_video_client:help( "Stops the YouTube video that's playing client-side." ) local songplayer_video_file = "ulx/songplayer_videos.txt" function ulx.save_video( calling_ply, url ) local video_id if url then -- Check if they're specifying a specific video to add by URL. video_id = ulx.getVideoIDFromURL( url ) if not video_id then ULib.tsayError( calling_ply, "Invalid YouTube URL", true ) return end else -- No URL specified, they must be trying to add their currently playing video. if not current_vid[ calling_ply ] then ULib.tsayError( calling_ply, "No YouTube videos have been played since you joined", true ) return end video_id = current_vid[ calling_ply ] url = "http://www.youtube.com/watch?v=" .. video_id end if ulx.songplayer_videos[ video_id ] then ULib.tsayError( calling_ply, "This video is already on the server's playlist", true ) return end http.Fetch( "http://gdata.youtube.com/feeds/api/videos/" .. video_id .. "?v=2", "", function( contents ) local video_title = ulx.getVideoTitleFromHTTPData( contents ) local video_length = ulx.getVideoLengthFromHTTPData( contents ) ulx.songplayer_videos[ video_id ] = { title = video_title, length = video_length } file.Write( songplayer_video_file, ULib.makeKeyValues( ulx.songplayer_videos ) ) ULXClientSongListRefresh() ulx.fancyLogAdmin( calling_ply, "#A saved YouTube video to server:\n#s\n#s", url, video_title ) end ) end local save_video = ulx.command( ulx_cmd_category, "ulx savevid", ulx.save_video, "!savevid", true ) save_video:defaultAccess( ULib.ACCESS_ADMIN ) save_video:addParam{ type = ULib.cmds.StringArg, hint = "url" } save_video:help( "Saves a YouTube video URL to the server's playlist." ) local save_cur_video = ulx.command( ulx_cmd_category, "ulx savecurvid", ulx.save_video, "!savecurvid", true ) save_cur_video:defaultAccess( ULib.ACCESS_ADMIN ) save_cur_video:help( "Saves the currently playing/last played YouTube video to the server's playlist." ) function ulx.remove_video( calling_ply, url ) local video_id = ulx.getVideoIDFromURL( url ) if not video_id then ULib.tsayError( calling_ply, "Invalid YouTube URL", true ) return end if not ulx.songplayer_videos[ video_id ] then ULib.tsayError( calling_ply, "This video is not on the se
Check your Youtube Player addon :v:
[QUOTE=Scratch.;43544307]Check your Youtube Player addon :v:[/QUOTE] Hmm..... What do you mean.
[QUOTE=Pogle;43544402]Hmm..... What do you mean.[/QUOTE] The error is coming from your youtube player, not damagelog.
If you actually read through that addons thread you see that there is a GM13 download. You have most likely downloaded the original old code. Remove the old files. Download and install this [url]http://dl.dropbox.com/u/18804041/admin_ulx%20youtube.7z[/url]
Sorry, you need to Log In to post a reply to this thread.