Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-12-11 00:00:00Z and 2020-12-12 00:00:00Z
Avatar
why my pSelf variable is like that?
19:34
no definined (edited)
19:35
i am in gamecontext.cpp
Avatar
try removing pSelf->
Avatar
yes that works now but before i put pSelf and that work too
19:37
weird
Avatar
the question is if you're in a static member function or not
19:38
if you're in a static member function, you can't access this
19:38
SendChat() implicitly means this->SendChat()
19:38
but in a static member function, you need a CGameContext variable, probably a parameter
Avatar
hmmm ok
21:40
21:40
somebody can tell me why this command dont work
Avatar
you also need to register the command
Avatar
i want Bonjour command say Bien le bonjour in remote console
21:40
hmm wym
Avatar
search for all occurences of ConSay in the code
21:41
there should be a line with Console()->Register(…, ConSay, …)
21:41
somewhere
Avatar
Console()->Register("say", "r[text]", CFGFLAG_SERVER, ConSay, this, "Say in chat");
Avatar
ye, you need something like that
Avatar
but the problem is that the command does not appear in the console
Avatar
Console()->Register("bonjour", "", CFGFLAG_SERVER, ConBonjour, this, "Say 'Bonjour'");
21:45
did you add sth like that?
Avatar
ds
21:48
harg image dont load
21:48
SPOILER
Image attachment
Avatar
did you add a line like the above?
Avatar
@Deleted User you forgot to register it as heinrich said
21:52
should be in gamecontext.cpp by default
21:52
on vanilla
21:53
if i'm not wrong?
Avatar
sounds good
Avatar
hmm and how i can register it?
21:54
open gamecontext.cpp & go at the bottom of the file, there's already some registered commands, just copy paste a line & edit it
21:56
A retro multiplayer shooter. Contribute to teeworlds/teeworlds development by creating an account on GitHub.
21:59
i'm lost xd i see this line in gamecontext but what i do after
22:01
copy-paste the line I highlighted in the link above
22:01
and just replace values
22:01
22:01
yes
22:01
that dont change
22:01
same text
22:01
edit it lol...
22:02
hehe ty (edited)
Exported 48 message(s)