speppoz 7 Posted February 14, 2018 Share Posted February 14, 2018 Hi all! I'm trying to do a bonus page inside the character window but with more pages. For example one player has to press C or V or B or N, then left click on 'BONUS' (on the right of 'QUEST') and then he can click on various buttons inside the bonus page. If I put only 1 page with no other buttons in the bonus page it works, but if I try to insert them it gives me the error: uiCharacter.py(line:424) __LoadWindow uiCharacter.py(line:161) __LoadScript ui.py(line:2854) LoadScriptFile ui.py(line:3072) CheckKeyList CharacterWindow.__LoadWindow - <type 'exceptions.AttributeError'>:'tuple' object has no attribute 'has_key' 0214 14:44:17942 :: ============================================================================================================ 0214 14:44:17942 :: Abort!!!! Can someone help me please? This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up 1 1 1 Link to comment Share on other sites More sharing options...
Tasho 244 Posted February 14, 2018 Share Posted February 14, 2018 Quote 'tuple' object has no attribute 'has_key' The method has_key() returns true if a given key is available in the dictionary, otherwise it returns a false. You have tuple not a dictionary, so you should do something like: if number in tupleArgs: [....] Or maybe your code is expecting a dictionary and getting a tuple instead. Upload the file on This is the hidden content, please Sign In or Sign Up , i can't download them from attachments. 2 1 5 2 Link to comment Share on other sites More sharing options...
speppoz 7 Posted February 14, 2018 Author Share Posted February 14, 2018 17 hours ago, Tasho said: Upload the file on This is the hidden content, please Sign In or Sign Up , i can't download them from attachments. This is the hidden content, please Sign In or Sign Up 17 hours ago, Tasho said: You have tuple not a dictionary So i can implement a function or try to do it in a different way.. Meanwhile I will work on it and if it will works I will share it Edit: I think the problem is in characterwindow.py. Pheraps it is written in a bad way but I don't know why.. Edit_2: I managed to insert the buttons in the bonus page area and when I click on them they give me a blank page how did I expect. Now I will try to show the correct content after the click. If someone want to help me I can share the code 1 2 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now