Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
devilsnake88
Junior Member
Posts: 7
Joined: Mon Feb 18, 2013 4:03 pm
Contact:

Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Postby devilsnake88 » Thu Mar 14, 2019 12:05 pm

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!
User avatar
Ayuto
Project Leader
Posts: 1992
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Postby Ayuto » Sat Mar 16, 2019 10:46 pm

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.
User avatar
Ayuto
Project Leader
Posts: 1992
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Postby Ayuto » Wed Apr 03, 2019 5:25 pm

Version 685 of Source.Python now exposes recursive_copy, so that issue should be fixed.
User avatar
devilsnake88
Junior Member
Posts: 7
Joined: Mon Feb 18, 2013 4:03 pm
Contact:

Re: Ayuto - EventScripts-Emulator - RecursiveCopyKeyValues

Postby devilsnake88 » Sun Apr 07, 2019 8:12 am

Thank you very much Ayuto :)

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 9 guests