'command' variable doesn't seem right in the SayCommand listener
Posted: Sun Jan 25, 2015 2:10 pm
Hi,
I have the following code:The output isWas this intended or is there something wrong? lol
I have the following code:
Syntax: Select all
from commands.say import SayCommand
from players.helpers import index_from_playerinfo
from messages import SayText2
@SayCommand("flashtop")
def saycommand_flashtop(playerinfo, teamonly, command):
"""
Gets called whenever a player types 'flashtop' in the chat.
"""
SayText2(message="command: {0}, {1}".format(command[0], command[1]).send(index_from_playerinfo(playerinfo))
Code: Select all
flashtop 4
=> say, flashtop 4