Jump to content

تصحيح كود


#Hulk

Recommended Posts

السلام عليكم ,

انا مسوي فكرة شبيةة ل الريبورت بس ,

لمه اجي احدد من القريد ليست بيجي اخر شي رسلته , يعني ما يتحدد

وفي خطأ لمه اكتب المفروض يجيب الي كتبته الي هو الاسم والنمبر بس شكله مخربط

الاكواد :

--- Server
executeSQLQuery( "CREATE TABLE IF NOT EXISTS Systems (Text,combo,edit1,edit2)" )

addEvent ( "onScirpt", true )
addEventHandler ( "onScirpt", root,
	function ( )
		local SQLListe = executeSQLQuery ( "SELECT * FROM Systems " )
		if #SQLListe ~= 0 then
			triggerClientEvent ( client, "AddRow", client, SQLListe )
		end
	end
)
--Text,combo, edit
addEvent ( "SendReport", true )
addEventHandler ( "SendReport", root,
	function ( text, combo, edit )
	executeSQLQuery("INSERT INTO Systems ( Text, combo, edit1, edit2 ) VALUES ( ?, ?, ? )", tostring ( Text ), tostring ( combo ), tostring ( edit1 ), tostring ( edit2 ) )
	end
)

 

Client

local Text = guiGetText(INF)-- 
local combo = guiComboBoxGetItemText(combo, guiComboBoxGetSelected(combo))
local edit1 = guiGetText( editnumber )
local edit2 = guiGetText( editname )
local Row = guiGridListAddRow(gr)
guiGridListSetItemText( gr, Row, 1, Text, false, false)
guiGridListSetItemText( gr, Row, 2, combo, false, false)
guiGridListSetItemText( gr, Row, 3, edit1, false, false)
guiGridListSetItemText( gr, Row, 3, edit2, false, false)
triggerServerEvent("SendReport", localPlayer, Text,combo, edit1, edit2)
triggerServerEvent("onScirpt",source)
setTimer ( function()
	--outputChatBox("Welcome")
guiSetEnabled(done, false)
	end, 200, 1 )
	playSoundFrontEnd(10)
elseif source == close3 then
guiSetVisible(details,false)--done
elseif source == rules then
guiSetVisible(wndr,true)
elseif source == btnn2 then
guiSetText(memo3,"           ------- No Notes -----")
elseif source == btnp2 then
guiSetText(memo3,"           ------- No Officer now -----")
elseif source == btnr2 then
guiSetText(memo3,"\n\n\n\n\n\n\n\n\n\n-------------= No Rules Now -------------=")
elseif source == btnX then
guiSetVisible(wndr,false)
showCursor( false )
elseif source == done then
guiSetVisible(wnd4,true)
showCursor( false )
end
end)


addEvent("AddRow",true)
addEventHandler("AddRow",root,
function( table )
guiGridListClear(gr)
for i,v in ipairs ( table ) do
local Row = guiGridListAddRow(gr)
guiGridListSetItemText( gr, Row, 1, Text, false, false)
guiGridListSetItemText( gr, Row, 2, combo, false, false)
guiGridListSetItemText( gr, Row, 3, edit1, false, false)
guiGridListSetItemText( gr, Row, 3, edit2, false, false)
end
end
)

addEventHandler("onClientGUIClick",root,
function()
if source == clo then
guiSetVisible(wnd2,false)
showCursor(false)
elseif source == sd then--guiGridListGetSelectedItem
guiSetVisible(details,true)
if guiGridListGetSelectedItem ( gr ) ~= -1 then
guiGridListGetItemText ( gr, guiGridListGetSelectedItem ( gr ), 1 )
guiSetText(getmemo,guiGetText(INF))
guiSetText(editname,guiGetText(getname))
guiSetText(editnumber,guiGetText(getnumber))
showCursor(true)
end
end
end)

+ اسف لو في اخطاء اول مره انزل في الجروب

Link to comment
1 hour ago, iMr.WiFi..! said:

عيد صناعة الكود من جديد مع احتر امي الكامل .. 

الكود فيه اخطاء كثيرة !! 
مايحتاج كل هذي الاسطر ..

في اخطاء بالترايقر
 

   عارف انو مخربط وفيه اخطاء وانا قولت فوق + كل مره ابدأ م الاول فيه اصلا , بس نفس الاخطاء اظن + بحاول تاني

التحديد مش شغال فيه حل ؟

Edited by Mr_#DeKsS
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...