Jump to content

Gui Error


Recommended Posts

strange error here:

client side:

    GUIEditor = { 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Window[1] = guiCreateWindow(351,281,522,509,"Missions",false) 
        guiSetVisible (GUIEditor_Window[1], false) 
        guiWindowSetSizable(GUIEditor_Window[1],false) 
        Mission1_Button[1] = guiCreateButton(23,43,132,37,"Mission 1",false,GUIEditor_Window[1]) 
        Mission2_Button[2] = guiCreateButton(193,43,132,37,"Mission 2",false,GUIEditor_Window[1]) 
        Mission3_Button[3] = guiCreateButton(368,43,126,37,"Mission 3",false,GUIEditor_Window[1]) 
        Close_Button[4] = guiCreateButton(194,471,139,26,"Close",false,GUIEditor_Window[1]) 
--- handlers 
        addEventHandler ("onClientGUIClick", Close_Button[4], hideIt, false) 
    end 
) 
  
function showIt () 
guiSetVisible (GUIEditor_Window[1], true) 
showCursor ( true ) 
end 
addEvent ("ShowMarkerNow", true) 
addEventHandler ("ShowMarkerNow", getRootElement(), showIt) 
  
function hideIt (button, state) 
    if (button == "left" and state == "up") then 
        guiSetVisible (GUIEditor_Window[1], false) 
        showCursor ( false ) 
    end 
end 

error:

 attempt to index global 'GUIEditor_window' (a nil value) 

Link to comment
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
  
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Window[1] = guiCreateWindow(351,281,522,509,"Missions",false) 
        guiSetVisible (GUIEditor_Window[1], false) 
        guiWindowSetSizable(GUIEditor_Window[1],false) 
       GUIEditor_Button[1] = guiCreateButton(23,43,132,37,"Mission 1",false,GUIEditor_Window[1]) 
        GUIEditor_Button[2] = guiCreateButton(193,43,132,37,"Mission 2",false,GUIEditor_Window[1]) 
        GUIEditor_Button[3] = guiCreateButton(368,43,126,37,"Mission 3",false,GUIEditor_Window[1]) 
        GUIEditor_Button[4] = guiCreateButton(194,471,139,26,"Close",false,GUIEditor_Window[1]) 
--- handlers 
        addEventHandler ("onClientGUIClick", GUIEditor_Button[4], hideIt, false) 
    end 
) 
  
function showIt () 
guiSetVisible (GUIEditor_Window[1], true) 
showCursor ( true ) 
end 
addEvent ("ShowMarkerNow", true) 
addEventHandler ("ShowMarkerNow", getRootElement(), showIt) 
  
function hideIt (button, state) 
    if (button == "left" and state == "up") then 
        guiSetVisible (GUIEditor_Window[1], false) 
        showCursor ( false ) 
    end 
end 

Your table was wrong ;p

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