السلام عليكم ورحمة الله و بركاته
شباب اليوم سويت لوحة تغيير سرعة اللعبة
"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 )
و شكرا