Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
So I have a bot that does something when you collect a crown. Unfortunately, no matter what, when the bot enters, everything under m.Type == "k" triggers, even though no crown exists in the room or on anyone. I'm extremely confused; what do I do?
Offline
You need to read userid. Should be like -1 which mean none have the crown.
Offline
Offline
^I think he's saying that "init" and "add" and "b" etc. are showing up as crowns
No, because he said this:
everything under m.Type == "k" triggers
Capasha's probably right. Just preface it with:
if (m.GetInt(0) == -1)
return;
That'll just stop the function if it's a "nobody has the crown" message.
Yeah, well, you know that's just like, uh, your opinion, man.
Offline
Offline
WRONG! You should ignore the first "k" you get. "k" on join is not always going to be -1, it could even be an invalid ID of a user that has left the room before you!
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
WRONG! You should ignore the first "k" you get. "k" on join is not always going to be -1, it could even be an invalid ID of a user that has left the room before you!
Shouldn't you still need to know who has the crown originally? (I'm sure there are some uses for it)
I mean, you can always ignore it if the given ID isn't one that's currently applyable.
Offline
No, OP says:
So I have a bot that does something when you collect a crown.
The crown is not collected when your receive your first "k".
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
Offline
Pages: 1
[ Started around 1734018053.0967 - Generated in 0.076 seconds, 12 queries executed - Memory usage: 1.46 MiB (Peak: 1.61 MiB) ]