Question about FindAndDoWithPlayer
#1
I'm working on fixing Core issue #135, and the documentation for FindAndDoWithPlayer seems lacking.

Is it case-sensitive or insensitive?
Reply
Thanks given by:
#2
It's case-insensitive. It uses the RateCompareString function, and that compares each character by making them uppercase first: https://github.com/mc-server/MCServer/bl...s.cpp#L303
Reply
Thanks given by:
#3
Great, thanks for the solution.

Actually, thinking about this problem with plugins in general, I think we need a function DoWithClosestMatchedPlayer. Lots of functions require this and they all implement it slightly differently, inconsistently enough to be annoying to end users.

Do you think this is something that we need?
Reply
Thanks given by:
#4
Isn't that what FindAndDoWithPlayer does?
Reply
Thanks given by:
#5
You're right, I read through the code and it does do that.

Then I need to change the documentation, it says that it'll run the callback on all matching players.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)