drk Posted January 28, 2012 Share 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? Link to comment
BriGhtx3 Posted January 28, 2012 Share Posted January 28, 2012 is this your whole code? Link to comment
Kenix Posted January 28, 2012 Share 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 ) Link to comment
drk Posted January 28, 2012 Author Share Posted January 28, 2012 is this your whole code? No. Link to comment
drk Posted January 28, 2012 Author Share 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. Link to comment
BriGhtx3 Posted January 28, 2012 Share Posted January 28, 2012 you cant have an script error in an image oO Link to comment
drk Posted January 28, 2012 Author Share Posted January 28, 2012 But I have Want a print? Link to comment
Kenix Posted January 28, 2012 Share Posted January 28, 2012 Convert your code to UTF-8 without BOM Link to comment
H5N1 Posted January 28, 2012 Share Posted January 28, 2012 Your table gui = {} is local. When you use it outside this function, it wont work. Link to comment
drk Posted January 28, 2012 Author Share Posted January 28, 2012 LOL, isn't the problem I've solved the problem and it isn't what you said Link to comment
BriGhtx3 Posted January 28, 2012 Share Posted January 28, 2012 H5N1 this is clientside. It doesn't matter if there is a local or not Link to comment
TAPL Posted January 28, 2012 Share 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 Link to comment
H5N1 Posted January 29, 2012 Share 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 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