^#Dream Posted August 3, 2014 Posted August 3, 2014 السسلام عليكم انا عندي مششكلة بذا الكود -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,song[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],row,1,song[2]) end -- Start \ Sound addEventHandler("onClientGUIClick", root, function() if (source == GUIEditor.button[2]) then if(sound)then return end local statioURL = guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) sound = playSound ( stationURL ) elseif(source == GUIEditor.button[1])then if isElement(sound) then destroyElement(sound) sound = nil end
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,song[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( UIEditor.gridlist[1] ) ~= -1 ) then local statioURL = guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end )
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 الله يعطيك العافيةة بس الـ Sound مايطلع بالرو يجي قريد لست فاضي
jafar Posted August 3, 2014 Posted August 3, 2014 الله يعطيك العافيةة بس الـ Sound مايطلع بالرو يجي قريد لست فاضي أتأكد من اسمه
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 الكود صحيح .. بس تاكد من اسم اللستة وشف الديبوق وش يقول
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 تآكدت من الاسم صحيح الديبق يقول لي Bad argument @ 'guiGridListAddRow' [Expected gui-element at argument 1, got nill] + Bad argument @ 'guiGridListSetItemText' [Expected gui-element at argument 1, got nill] + Bad argument @ 'guiGridListSetItemData' [Expected gui-element at argument 1, got nill]
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 زي ما قلت لكـ .. اسم اللستة خطا .. تاكد من سطر صناعة اللستة وشف الاسم حقها !
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 زي ما قلت لكـ .. اسم اللستة خطا .. تاكد من سطر صناعة اللستة وشف الاسم حقها ! + بسطر 16 g ملاحظة .. ناسي حرف الـ عدل كل متغيرات اللستة الى الاسم الصحيح !
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 مآفيهه آي شي نفس الاسماء GUIEditor.gridlist[1] = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.9) end ) -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,song[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then local statioURL = guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end )
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 Bad argument @ 'playSound' [Expected string at argument 1, got nill]
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 شكلك مسوي هريس .. اطرح الكود كامل واطرح الميتا
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(282, 130, 236, 396, "Window", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(9, 345, 217, 37, "Stop / آيقاف", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(9, 308, 217, 37, "Start / تشغيل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.9) -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,song[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then local statioURL = guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end ) Meta
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 GUIEditor.window[1] = guiCreateWindow(282, 130, 236, 396, "Window", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(9, 345, 217, 37, "Stop / آيقاف", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(9, 308, 217, 37, "Start / تشغيل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") elementlist = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1]) guiGridListAddColumn(elementlist, "#", 0.9) -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(elementlist) guiGridListSetItemText(elementlist,row,1,song[1],false,false) guiGridListSetItemData(elementlist,row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( elementlist ) ~= -1 ) then local statioURL = guiGridListGetItemData ( elementlist, guiGridListGetSelectedItem ( elementlist ), 1 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end )
^#Dream Posted August 3, 2014 Author Posted August 3, 2014 Bad argument @ 'playSound' [Expected string at argument 1, got nill]
Max+ Posted August 3, 2014 Posted August 3, 2014 Bad argument @ 'playSound' [Expected string at argument 1, got nill] ---ClientSide GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(282, 130, 236, 396, "Window", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(9, 345, 217, 37, "Stop / آيقاف", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(9, 308, 217, 37, "Start / تشغيل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.9) -- Sound's songs = { {"http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,song[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then local statioURL = guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end )
shwaeki Posted August 3, 2014 Posted August 3, 2014 جرب GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(282, 130, 236, 396, "Window", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(9, 345, 217, 37, "Stop / آيقاف", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(9, 308, 217, 37, "Start / تشغيل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") elementlist = guiCreateGridList(9, 19, 217, 285, false, GUIEditor.window[1]) guiGridListAddColumn(elementlist, "#", 0.9) -- Sound's songs = { {"Sound","http://cdn.top4top.net/d_11668d4a9b1.mp3"}, } for _,song in ipairs(songs) do row = guiGridListAddRow(elementlist) guiGridListSetItemText(elementlist,row,1,song[1],false,false) guiGridListSetItemData(elementlist,row,1,song[2]) end -- Start \ Sound addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( guiGridListGetSelectedItem ( elementlist ) ~= -1 ) then local statioURL = guiGridListGetItemData ( elementlist, guiGridListGetSelectedItem ( elementlist ), 2 ) if ( statioURL ~= "" ) then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end SoundURL = playSound ( stationURL ) end end elseif ( source == GUIEditor.button[1] )then if ( isElement ( SoundURL ) ) then destroyElement ( SoundURL ) end end end )
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 الاثنين خطا ! .. الكود صحيح ما فيه شي المشكلة من عندهـ
Max+ Posted August 3, 2014 Posted August 3, 2014 الاثنين خطا ! .. الكود صحيح ما فيه شي المشكلة من عندهـ {"Sound", وش دخلها ذي ؟ الخطأ بمسار التشغيل كما هو موضح انت حاط ذي
#DRAGON!FIRE Posted August 3, 2014 Posted August 3, 2014 الاثنين خطا ! .. الكود صحيح ما فيه شي المشكلة من عندهـ {"Sound", وش دخلها ذي ؟ الخطأ بمسار التشغيل كما هو موضح انت حاط ذي هذا اسم الرو !! وكودكـ خطا !
Simple. Posted August 3, 2014 Posted August 3, 2014 ^ليش المششكلة من رابط الصوت ؟ انا تصير معي , والكود كويس , آغير رآبط آلصوت يضبط
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now