K4stic Posted March 11, 2013 Share Posted March 11, 2013 function menushow () local getoccup = getElementData( source, "Occupation" ) visibleornot =guiGetVisible (theWindow2) if (Visibleornot == true) then guiSetVisible (theWindow2, false) showCursor (false) guiSetText(label,"",true) end if (Visibleornot == false) then guiSetVisible (theWindow2, true) showCursor (true) guiSetText(label,"Your Correct Occupation: "..getoccup,false) end end error line 12 and warning at line 2 Link to comment
Sasu Posted March 11, 2013 Share Posted March 11, 2013 function menushow () visibleornot = guiGetVisible (theWindow2) if (Visibleornot == true) then guiSetVisible (theWindow2, false) showCursor (false) guiSetText(label,"",true) elseif (Visibleornot == false) then guiSetVisible (theWindow2, true) showCursor (true) local getoccup = getElementData( getLocalPlayer(), "Occupation" ) guiSetText(label,"Your Correct Occupation: "..getoccup,false) end end Link to comment
K4stic Posted March 11, 2013 Author Share Posted March 11, 2013 thx lol so easy just add a getLocalPlayer() Link to comment
iPrestege Posted March 11, 2013 Share Posted March 11, 2013 thx lol so easy just add a getLocalPlayer() Because source is not defined in client side. Link to comment
CapY Posted March 12, 2013 Share Posted March 12, 2013 Sorry for interrupting, but the guiSetText function has only two arguments(element guiElement, string text), not three. So, actually there's no need to specify a bool at the third argument. 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