Jump to content

Unexpected symbol near Error


DJsidjiqwdq

Recommended Posts

hi i 've created my first  menu with Guieditor

and i've scripted it but after i want to test it it didn't work1qX9i3t.png

and i found this Error: as you can see it on the image 

and this is the script

 


GUIEditor = {
    button = {},
    window = {},
    edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(519, 260, 344, 304, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.edit[1] = guiCreateEdit((344 - 199) / 2, (304 - 20) / 2, 199, 20, "", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(280, 256, 55, 26, "‗הב", false, GUIEditor.window[1])
        GUIEditor.edit[2] = guiCreateEdit(507, 146, 0, 110, "", false, GUIEditor.window[1])
        GUIEditor.edit[3] = guiCreateEdit(17, 196, 245, 86, "", false, GUIEditor.window[1])    
    end
)


local key = "F3"

bindkey(key, "down",
function()
    guiSetVisible(GUIEditor.window[1])) 
	showCursor(guiGetVisible(GUIEditor.window[1]))
end	 
) 



addEventHandler("onClienGUIClick",root,
   if (source == GUIEditor.button[1])
       guiSetVisible(GUIEditor.window[1],false)
       showCursor(false)
   end
end	

what do i do to fix this??

Link to comment
  • Scripting Moderators
addEventHandler("onClienGUIClick",root,
   if (source == GUIEditor.button[1])
       guiSetVisible(GUIEditor.window[1],false)
       showCursor(false)
   end
end)
Link to comment
GUIEditor = {
    button = {},
    window = {},
    edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(519, 260, 344, 304, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.edit[1] = guiCreateEdit((344 - 199) / 2, (304 - 20) / 2, 199, 20, "", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(280, 256, 55, 26, "‗הב", false, GUIEditor.window[1])
        GUIEditor.edit[2] = guiCreateEdit(507, 146, 0, 110, "", false, GUIEditor.window[1])
        GUIEditor.edit[3] = guiCreateEdit(17, 196, 245, 86, "", false, GUIEditor.window[1])    
    end
)


local key = "F3"

bindkey(key, "down",
function()
    guiSetVisible(GUIEditor.window[1],true) 
	showCursor(guiGetVisible(GUIEditor.window[1]))
end	 
) 



addEventHandler("onClientGUIClick",root,
   if (source == GUIEditor.button[1])
       guiSetVisible(GUIEditor.window[1],false)
       showCursor(false)
   end
end	

By the way, this should go to the "scripting" section, not here.

Edited by MadnessReloaded
Link to comment
2 hours ago, MadnessReloaded said:

GUIEditor = {
    button = {},
    window = {},
    edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(519, 260, 344, 304, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.edit[1] = guiCreateEdit((344 - 199) / 2, (304 - 20) / 2, 199, 20, "", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(280, 256, 55, 26, "‗הב", false, GUIEditor.window[1])
        GUIEditor.edit[2] = guiCreateEdit(507, 146, 0, 110, "", false, GUIEditor.window[1])
        GUIEditor.edit[3] = guiCreateEdit(17, 196, 245, 86, "", false, GUIEditor.window[1])    
    end
)


local key = "F3"

bindkey(key, "down",
function()
    guiSetVisible(GUIEditor.window[1],true) 
	showCursor(guiGetVisible(GUIEditor.window[1]))
end	 
) 



addEventHandler("onClientGUIClick",root,
   if (source == GUIEditor.button[1])
       guiSetVisible(GUIEditor.window[1],false)
       showCursor(false)
   end
end	

By the way, this should go to the "scripting" section, not here.

did you fix this script? if yes ty i'll test it

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...