Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. 2016-08-29T18:01:09+0000 [AMPProtocol,0,127.0.0.1] [..] Logged in: Ghost(player 4) 64.85.204.2 (1 session(s) total)
  2. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] Traceback (most recent call last):
  3. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/commands/cmdhandler.py", line 464, in _run_command
  4. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] ret = yield cmd.func()
  5. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/utils/evmenu.py", line 238, in func
  6. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] menu._input_parser(menu, self.raw_string, caller)
  7. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/utils/evmenu.py", line 368, in evtable_parse_input
  8. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] menuobject.callback_goto(callback, goto, raw_string)
  9. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/utils/evmenu.py", line 661, in callback_goto
  10. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] self.callback(callback, raw_string)
  11. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/utils/evmenu.py", line 685, in callback
  12. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] nodename(self.caller)
  13. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] TypeError: <lambda>() takes no arguments (1 given)
  14. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] Traceback (most recent call last):
  15. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] File "/home/ubuntu/evennia/evennia/commands/cmdhandler.py", line 597, in cmdhandler
  16. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] ret = yield _run_command(syscmd, syscmd.key, sysarg)
  17. 2016-08-29T18:01:23+0000 [AMPProtocol,0,127.0.0.1] [::] ErrorReported
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. **************************************** Code *****************************************************
  26. def wrapper(i):
  27. return lambda: i
  28.  
  29. def askLevelSelect(caller):
  30. xp = caller.db.xp
  31. num_levels = 0
  32. if caller.db.special == "experience":
  33. num_levels = xp / 90
  34. else:
  35. num_levels = xp / 100
  36.  
  37. options = ()
  38. text = "Please choose the class that you wish to level in."
  39.  
  40. for item in sorted(get_levels(caller))[:2]:
  41. node_dict = {"desc": item.title(), "goto": "confirm_class", "exec": wrapper(item)}
  42. options = options + (node_dict,)
  43.  
  44.  
  45. #options = ({"key": "escape artist", "desc": "Escape Artist", "goto": "confirm_class", "exec": set_selected_level},
  46. # {"desc": "Mechanic", "goto": "confirm_class", "exec": set_selected_level})
  47.  
  48. caller.msg(str(options))
  49.  
  50.  
  51. return text, options
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement