Piorun Posted February 24, 2013 Posted February 24, 2013 I have one, simple question: Why this code doesn't work? : CLIENT (ucp_c.lua): ucp = {} function ucp.showLoginBar() if guiGetVisible(ucp.loginBar) == false then guiSetVisible(ucp.loginBar, true) else guiSetVisible(ucp.loginBar, false) end end META.XML (ucp): <export function="ucp.showLoginBar" type="client" /> CLIENT (other.lua): call(getResourceFromName("ucp"), "ucp.showLoginBar") and error: failed to call Can anyone help?
50p Posted February 24, 2013 Posted February 24, 2013 You can't use functions this way. The exported functions must be simply defined as regular functions. function showLoginBar() if guiGetVisible(ucp.loginBar) == false then guiSetVisible(ucp.loginBar, true) else guiSetVisible(ucp.loginBar, false) end end
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