Jump to content

Unexpected symbol near Error


DJsidjiqwdq

Recommended Posts

Posted

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

  • Moderators
Posted
addEventHandler("onClienGUIClick",root,
   if (source == GUIEditor.button[1])
       guiSetVisible(GUIEditor.window[1],false)
       showCursor(false)
   end
end)
Posted
5 minutes ago, thisdp said:

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

didn't work

the error says line 24

  • Moderators
Posted
5 hours ago, MANSOR12312 said:

didn't work

the error says line 24

guiSetVisible(GUIEditor.window[1])0) 

 

guiSetVisible(GUIEditor.window[1])
Posted (edited)
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

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
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

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