LiOneLMeSsIShoT Posted December 13, 2013 Share Posted December 13, 2013 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
Castillo Posted December 13, 2013 Share Posted December 13, 2013 That's because there's no table with the name "GUIEditor_Window". Link to comment
LiOneLMeSsIShoT Posted December 13, 2013 Author Share Posted December 13, 2013 That's because there's no table with the name "GUIEditor_Window". the table made. check the script. it's in the top Link to comment
Castillo Posted December 13, 2013 Share Posted December 13, 2013 No, the table has a different name. Link to comment
LiOneLMeSsIShoT Posted December 13, 2013 Author Share Posted December 13, 2013 No, the table has a different name. alright i wont use tables then i will use without [1] or any number. Link to comment
PaiN^ Posted December 14, 2013 Share Posted December 14, 2013 alright i wont use tables then i will use without [1] or any number. Then you'll have to change the buttons varables' or it will be over writing . Link to comment
denny199 Posted December 14, 2013 Share Posted December 14, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now