Page 1 of 1

Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Posted: Thu Mar 14, 2019 12:05 pm
by devilsnake88
Hello dear peoples :)

I have a question about EventScripts Emulator so I think I should ask to @Ayuto.
I have this issue:
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/plugins/es_emulator/logic.py", line 103, in __call__
es.addons.callBlock(self.block_name)
File "../addons/source-python/plugins/es_emulator/eventscripts/es.py", line 356, in callBlock
self.Blocks[blockname]()
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 181, in callbackSay
cmd_manager.callback(cmd_manager.say_commands, es.getargv(0).lower())
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 111, in callback
cmdlist[name].execute(self.CMDArgs(es.getargv(x) for x in range(1, es.getargc())))
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/cmdlib.py", line 243, in execute
self.callback(userid, args)
File "../addons/source-python/plugins/es_emulator/eventscripts/test/test.py", line 1266, in rulesCmd
ru.send(userid)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/popuplib.py", line 256, in send
user.handleQueue()
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/popuplib.py", line 1419, in handleQueue
menudisplay = qpopup.checkCache(self.userid)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/popuplib.py", line 635, in checkCache
self.recache(userid)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/popuplib.py", line 543, in recache
self.cache[userlang] = self.i_recache(userlang)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/popuplib.py", line 602, in i_recache
menuitems[choice]['command'])
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/msglib.py", line 39, in addOption
self.kv[names] = keyvalues.KeyValues(name=names)
File "../addons/source-python/plugins/es_emulator/eventscripts/_libs/python/keyvalues.py", line 147, in __setitem__
es.keyprecursivekeycopy(x, value._id_)
File "../addons/source-python/plugins/es_emulator/eventscripts/es_C.py", line 2032, in keyprecursivekeycopy
_make_keyvalues(key_ptr).recursive_copy(

AttributeError: 'KeyValues' object has no attribute 'recursive_copy'


@L'In20Cible helped me by sending me this link:
https://github.com/Ayuto/EventScripts-E ... C.py#L2031

Thank you for your help and I wish you a great day!

Re: Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Posted: Sat Mar 16, 2019 10:46 pm
by Ayuto
I actually planned to expose that function with SP to use it in the emulator. But IIRC it didn't exist on all games. Thus, it's still an open TODO. I will take a look at it again very soon.