Tete omar Posted June 3, 2012 Share Posted June 3, 2012 what's worng with this script ? function createGUIWindow1() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(363,194,579,330,"[sSC] Black list",false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(80,45,364,34,"No one yet",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(7,67,66,24,"Attention:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(70,67,502,15,"Do not copy their names and put it as your nickname becuase you will banned for 2 days",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(140,271,295,50,"Reason",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(74,-117,98,40,"",false,GUIEditor_Button[1]) GUIEditor_Memo[1] = guiCreateMemo(115,238,345,31," Read Why these peoples in black list",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible ( GUIEditor_Window[1] ,false ) addEventHandler("onClientResourceStart", root, createGUIWindow1) end addCommandHandler("blacklist", createGUIWindow1) debugscript says: ERROR:8: attempt to call global 'guiCreateWindow' ( a nil value ) Link to comment
Castillo Posted June 3, 2012 Share Posted June 3, 2012 Check your meta.xml, your script must be set as type = "server" instead of type = "client". Link to comment
Tete omar Posted June 3, 2012 Author Share Posted June 3, 2012 It's already exist "Tete&mohamed" type="script" version="1.0.0"/> Link to comment
Castillo Posted June 3, 2012 Share Posted June 3, 2012 Is set as server side, I told you that it must be client side. Link to comment
Tete omar Posted June 3, 2012 Author Share Posted June 3, 2012 sorry for misunderstood Link to comment
Tete omar Posted June 3, 2012 Author Share Posted June 3, 2012 ? But it's the same error :\ ERROR:8: attempt to call global 'guiCreateWindow' ( a nil value ) Link to comment
Castillo Posted June 3, 2012 Share Posted June 3, 2012 If the script is client side, it won't output that error anymore. Link to comment
Wei Posted June 3, 2012 Share Posted June 3, 2012 what is error? debugscript says: ERROR:8: attempt to call global 'guiCreateWindow' ( a nil value ) Link to comment
Alpha Posted June 3, 2012 Share Posted June 3, 2012 If the script is client side, it won't output that error anymore. Like he said. Change the type attribute in meta.xml to client. Link to comment
X-SHADOW Posted June 4, 2012 Share Posted June 4, 2012 and onClientResourceStart must use resourceRoot insted of root . Link to comment
Stanley Sathler Posted June 4, 2012 Share Posted June 4, 2012 Your code will not work well. You used a addCommandHandler() for call a function, but this function set the GUI visibility as false. Link to comment
Al3grab Posted June 4, 2012 Share Posted June 4, 2012 function createGUIWindow1() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(363,194,579,330,"[sSC] Black list",false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(80,45,364,34,"No one yet",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Label[2] = guiCreateLabel(7,67,66,24,"Attention:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(70,67,502,15,"Do not copy their names and put it as your nickname becuase you will banned for 2 days",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(140,271,295,50,"Reason",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(74,-117,98,40,"",false,GUIEditor_Button[1]) GUIEditor_Memo[1] = guiCreateMemo(115,238,345,31," Read Why these peoples in black list",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible ( GUIEditor_Window[1] ,false ) end addEventHandler("onClientResourceStart", resourceRoot, createGUIWindow1) addCommandHandler("blacklist", function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) 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