WriterUrDie Posted October 15, 2015 Share Posted October 15, 2015 السلام عليكم ورحمة الله و بركاته شباب اليوم سويت لوحة تغيير سرعة اللعبة "stack overflow" لكن واجهتني مشكلة (عادة) و هي خطأ في الديبوق بالسطر 26 ماعرفلها و اول مرة اسمع عنها كودي : GUIEditor = { button = {}, window = {}, edit = {}, label = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 172) / 2, 233, 172, "GameSpeed", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF68908") GUIEditor.label[1] = guiCreateLabel(9, 31, 221, 21, "GameSpeed :", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 13, 61, 240) GUIEditor.edit[1] = guiCreateEdit(9, 62, 215, 28, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(80, 100, 72, 32, "Set", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF903DF") GUIEditor.label[2] = guiCreateLabel(9, 144, 219, 18, "Note: Accepted Values : \" 1~10 \"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 48, 168, 203) function setGameSpeed( ) local theSpeed = guiGetText (SpeedEdit) if ( theSpeed ~= nil or theSpeed ~= '' ) then setGameSpeed(tonumber(theSpeed)) outputChatBox ("GameSpeed : "..theSpeed.."",0,255,0) else return outputChatBox ("GameSpeed : ERROR.",255, 0, 0) end end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], setGameSpeed, false ) و شكرا Link to comment
Froze Posted October 15, 2015 Share Posted October 15, 2015 GUIEditor = { button = {}, window = {}, edit = {}, label = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(10, (screenH - 172) / 2, 233, 172, "GameSpeed", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF68908") GUIEditor.label[1] = guiCreateLabel(9, 31, 221, 21, "GameSpeed :", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 13, 61, 240) GUIEditor.edit[1] = guiCreateEdit(9, 62, 215, 28, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(80, 100, 72, 32, "Set", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF903DF") GUIEditor.label[2] = guiCreateLabel(9, 144, 219, 18, "Note: Accepted Values : \" 1~10 \"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 48, 168, 203) function setGameSpeedd( )-------سيت فيم سبيد = فنكشن ما يصلح تحطه اسم للفنكشن هذا local theSpeed = guiGetText(GUIEditor.edit[1])------المفروض هنا تحط اسم الايديت مب اسم من راسك if ( theSpeed ~= nil or theSpeed ~= '' ) then setGameSpeed(tonumber(theSpeed)) outputChatBox ("GameSpeed : "..theSpeed.."",0,255,0) else return outputChatBox ("GameSpeed : ERROR.",255, 0, 0) end end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], setGameSpeedd, false ) Link to comment
#CroSs Posted October 15, 2015 Share Posted October 15, 2015 'stack overflow' ذا الخطأ معناته السكربت معلق في فنكشن يكرر نفسه مثل function Spam() Spam() end Spam() مما يؤدي إلى مرات لا نهائية من التكرار وذا بالظبط إلي انت مسويه Link to comment
WriterUrDie Posted October 15, 2015 Author Share Posted October 15, 2015 احلي شباب وربي شكرا علي المعلومة + تمت الافادة Link to comment
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