drk Posted January 28, 2012 Posted January 28, 2012 I'm trying to make like this: local gui = {}; gui['form'] = guiCreateWindow( ... ); guiSetVisible(gui['form'],false); But when I debugscript, and I use the variable gui['form'] I get like this: 'Bad argument @ guiSetVisible (bad argument 1, ...)' When I use another variable like guiform or gui_form it work. Why it happens?
Kenix Posted January 28, 2012 Posted January 28, 2012 It should work maybe you use not in client side. local gui = { } gui['form'] = guiCreateWindow( "...",200,200,200,200,false ) guiSetVisible( gui['form'],false )
drk Posted January 28, 2012 Author Posted January 28, 2012 It should work maybe you use not in client side. local gui = { } gui['form'] = guiCreateWindow( "...",200,200,200,200,false ) guiSetVisible( gui['form'],false ) Aw, it client side. Now it working, I'm noob More one question, why when I load a image it says that isn't UTF-8 and I get this error: 'gfx/images/closeh.png:1:unexpected symbol near '?'' and don't load... Why? .-. I'm using MTA 1.3 release.
BriGhtx3 Posted January 28, 2012 Posted January 28, 2012 you cant have an script error in an image oO
H5N1 Posted January 28, 2012 Posted January 28, 2012 Your table gui = {} is local. When you use it outside this function, it wont work.
drk Posted January 28, 2012 Author Posted January 28, 2012 LOL, isn't the problem I've solved the problem and it isn't what you said
BriGhtx3 Posted January 28, 2012 Posted January 28, 2012 H5N1 this is clientside. It doesn't matter if there is a local or not
TAPL Posted January 28, 2012 Posted January 28, 2012 H5N1 this is clientside. It doesn't matter if there is a local or not doesn't matter if it was not inside any function but if it was inside function and you want use it from another function you will have to make it global
H5N1 Posted January 29, 2012 Posted January 29, 2012 H5N1 this is clientside. It doesn't matter if there is a local or not doesn't matter if it was not inside any function but if it was inside function and you want use it from another function you will have to make it global That's what I'm talking about
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