Saytext2 error

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
mister-man
Member
Posts: 70
Joined: Wed Aug 29, 2012 7:09 pm
Location: Germany

Saytext2 error

Postby mister-man » Thu Aug 15, 2013 9:57 am

Hay, I found two errors with SayText2, but I cant find a way to fix it.

First is a missing cvar:

Code: Select all

23
#darkredHay Im #whitethere!
40
#darkredHay Im #whitethere!
GetUserSetting: cvar 'cl_language' unknown.
41
#darkredHay Im #whitethere!
GetUserSetting: cvar 'cl_language' unknown.
42
#darkredHay Im #whitethere!
GetUserSetting: cvar 'cl_language' unknown.
43
#darkredHay Im #whitethere!
GetUserSetting: cvar 'cl_language' unknown.


Secound is a character in ingame messages (Attachments).


At last my Python Code:

Code: Select all

class saylib(object):
    def __init__(self):
        pass
         
    # Replaye readble color code
    def __setColor(self, msg):
        text = msg
        for key in chatColors:
            text = text.replace(key, str(chatColors[key]))
        return str(text)
   
    # Send a message to a single player
    def tell(self, msg, userid=0):
        if userid != 0:
            pindex = index_from_userid(userid)
            m = messages.SayText2(index=pindex, chat=1, message=str(self.__setColor(msg)))
            m.send(pindex)
Attachments
2013-08-15_00001.jpg
----------

Community of Gamers --> http://c-o-g.de

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 31 guests