Michael_Sund Posted September 20, 2011 Share Posted September 20, 2011 This doesn't seem to be calling my function "showLoginWindow()". It's client-side and the script is included in meta.xml as client type script. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), showLoginWindow) Link to comment
JR10 Posted September 20, 2011 Share Posted September 20, 2011 Post showLoginWindow function. Link to comment
Michael_Sund Posted September 20, 2011 Author Share Posted September 20, 2011 function showLoginWindow() createLoginWindow() outputChatBox("DEBUG 1 PASSED") if(wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox("An unexpected error has occured and the login GUI could not be created.") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), showLoginWindow) Link to comment
TAPL Posted September 20, 2011 Share Posted September 20, 2011 function showLoginWindow() createLoginWindow() outputChatBox("DEBUG 1 PASSED") if (guiGetVisible(wdwLogin) == false) then guiSetVisible(wdwLogin, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox("An unexpected error has occured and the login GUI could not be created.") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), showLoginWindow) Link to comment
Aibo Posted September 20, 2011 Share Posted September 20, 2011 use /debugscript 3 it is possible it stops on createLoginWindow() function. or does not run at all, depends on debug output. Link to comment
Michael_Sund Posted September 20, 2011 Author Share Posted September 20, 2011 Found the problems. I thought LUA operators were NOT like C++ and most other languages... I put the assignment operator instead of logical equals operator. Haha, fixing it right now. Thank you! 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