Discuss the EventScripts plugin for Valve's Source games.
→
I typed this in console:
] add_extraprop 1 Exfridos STEAM_0:1:31752888
] show_extraprops
I didn't get anything back from the show_extraprops
[GameSurge] GODJonez: but no errors either
[GameSurge] GODJonez: if args[3].startswith('STEAM_'):
[GameSurge] GODJonez: must not have returned True then
[GameSurge] GODJonez: it should but...
else:
es.dbgmsg(0, 'Not True')
es.dbgmsg(0, 'Not True')
I will try ^^
[GameSurge] GODJonez: try adding es.dbgmsg(0, args) to the beginning of addExtraprop
[GameSurge] GODJonez: to see what it exactly contains
It wasne't true
[GameSurge] GODJonez: it's as if the wiki page for cmdlib is telling lies
] add_extraprop 1 Exfridos STEAM_0:1:31752888
1 Exfridos STEAM_0:1:31752888
[GameSurge] GODJonez: ehh
[GameSurge] GODJonez: ah yeah, it is not a list but a magic object that has evil __str__ method
I don't understand how I can fix that
[GameSurge] GODJonez: change that to es.dbgmsg(0, args[:])
[GameSurge] GODJonez: no argh, the wiki page is actually correct
] add_extraprop 1 Exfridos STEAM_0:1:31752888
['1', 'Exfridos', 'STEAM_0', ':', '1', ':', '31752888']
[GameSurge] GODJonez: yep, the args list does not contain the command itself
[GameSurge] GODJonez: so all the indices are 1 smaller than with es.getargv
def addExtraprop(args):
if args[2].startswith('STEAM_'):
respected_people[''.join(args[2:])] = args[0:2]
if args[2].startswith('STEAM_'):
respected_people[''.join(args[2:])] = args[0:2]
That would work?
[GameSurge] GODJonez: yeah
[GameSurge] GODJonez: and the same with the other functions
mmh ^^
[GameSurge] GODJonez: I need to virtualslap SuperDave for that
Same error o:
Ah, wait.. (I pasted it on here, and did only correct it here xD)
] show_extraprops
STEAM_0:1:31752888, ['1', 'Exfridos']
Awesome ^-^
Can I get the value 1 back at anytime?
Aww, wait. Is 6 lines too much to paste directly?
Can I?
[GameSurge] GODJonez: yes
] add_extraprop 1 Exfridos STEAM_0:1:31752888
] show_extraprops
STEAM_0:1:31752888, ['1', 'Exfridos']
] add_extraprop 2 Exfridos STEAM_0:1:31752888
] show_extraprops
STEAM_0:1:31752888, ['2', 'Exfridos']
It must not change.. The number is the variable
It should be like:
1, ['Name', 'Steam']
2, ['Name', 'Steam']
1, ['Name', 'Steam']
2, ['Name', 'Steam']
[GameSurge] GODJonez: ah, so put that as the key
[GameSurge] GODJonez: still wouldn't work
Why?
respected_people[''.join(args[0])] = (args[2]+args[3:])
[GameSurge] GODJonez: I don't have time right now to go through it but if you try around you will see why it won't work
Naah, it didn't work
Okay ^^
[GameSurge] GODJonez: btw, here's the code snippet I talked about http://codepad.info/view?id=492cc531391bf42cf6bb59735cfb151ed3426e86
Thanks :)
Yeah, well.. Isen't it possible at all? Cause I can't get it to work..
respected_people[args[0]] = args[1]+''join(args[2:])
Chatting as guest1142142.
Change name
|
admins
|
|
|
|
|
|
members
|
|
|
Loading members...
|
|
|
guests
|
|
|
Loading guests...
|
|



