Zentharus Posted July 4, 2013 Share Posted July 4, 2013 Alright, so in my script i have these two lines, removeEventHandler("onClientGUIClick",btn_Login,onClickBtnLogin) if GuestEnable == true then removeEventHandler("onClientGUIClick",btnGuest,onClickGuest) Yet, for some odd reason on /debugscript 3 it is giving me this warning, the script works fine, but i wanna get rid of the warning WARNING: script\client.lua:220: Bad Argument @'removeEventHandler' [Expected element at argument 2] WARNING: script\client.lua:221: Bad Argument @'removeEventHandler' [Expected element at argument 2] Link to comment
Castillo Posted July 4, 2013 Share Posted July 4, 2013 It means that the element you put doesn't exist. "btn_Login" and "btnGuest". Link to comment
Zentharus Posted July 5, 2013 Author Share Posted July 5, 2013 I have rechecked the script and i can confirm that btn_Login and btnGuest exists? Link to comment
iPrestege Posted July 5, 2013 Share Posted July 5, 2013 Can you post the function when you create the btn? Link to comment
Zentharus Posted July 5, 2013 Author Share Posted July 5, 2013 i have a line like this that creates the buttons btn_Login = guiCreateButton(164,162,147,41,"Login",false,tab_Login) btnGuest = guiCreateButton(29,168,94,32,"Play as Guest",false,tab_Login) Link to comment
Castillo Posted July 5, 2013 Share Posted July 5, 2013 And you aren't destroying them by any chance? Link to comment
Zentharus Posted July 5, 2013 Author Share Posted July 5, 2013 Ahhh, im so stupid i forgot about that, thanks Link to comment
Zentharus Posted July 5, 2013 Author Share Posted July 5, 2013 Awesome, thanks it works now with no warnings or errors 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