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? EPT Team Server Development: 0% Learning C++ | C++ is amazing
BriGhtx3 Posted January 28, 2012 Posted January 28, 2012 is this your whole code? Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
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 ) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
drk Posted January 28, 2012 Author Posted January 28, 2012 is this your whole code? No. EPT Team Server Development: 0% Learning C++ | C++ is amazing
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. EPT Team Server Development: 0% Learning C++ | C++ is amazing
BriGhtx3 Posted January 28, 2012 Posted January 28, 2012 you cant have an script error in an image oO Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
drk Posted January 28, 2012 Author Posted January 28, 2012 But I have Want a print? EPT Team Server Development: 0% Learning C++ | C++ is amazing
Kenix Posted January 28, 2012 Posted January 28, 2012 Convert your code to UTF-8 without BOM http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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 EPT Team Server Development: 0% Learning C++ | C++ is amazing
BriGhtx3 Posted January 28, 2012 Posted January 28, 2012 H5N1 this is clientside. It doesn't matter if there is a local or not Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
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