Tete omar Posted June 3, 2012 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 )
Castillo Posted June 3, 2012 Posted June 3, 2012 Check your meta.xml, your script must be set as type = "server" instead of type = "client". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Tete omar Posted June 3, 2012 Author Posted June 3, 2012 It's already exist "Tete&mohamed" type="script" version="1.0.0"/>
Castillo Posted June 3, 2012 Posted June 3, 2012 Is set as server side, I told you that it must be client side. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Tete omar Posted June 3, 2012 Author Posted June 3, 2012 ? But it's the same error :\ ERROR:8: attempt to call global 'guiCreateWindow' ( a nil value )
Castillo Posted June 3, 2012 Posted June 3, 2012 If the script is client side, it won't output that error anymore. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TwiX! Posted June 3, 2012 Posted June 3, 2012 what is error? - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
Wei Posted June 3, 2012 Posted June 3, 2012 what is error? debugscript says: ERROR:8: attempt to call global 'guiCreateWindow' ( a nil value ) Diet with russian vodka, lose 3 days in one week !
Alpha Posted June 3, 2012 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. My Resources: [REL] Support System v1.0.2
X-SHADOW Posted June 4, 2012 Posted June 4, 2012 and onClientResourceStart must use resourceRoot insted of root . My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
Stanley Sathler Posted June 4, 2012 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. Software Engineer & Entrepreneur • Running Lustrel and VilarikA • Highly engaged on open source community
Al3grab Posted June 4, 2012 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 ) ING : [xXx]~Al3grab
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