Posts: 131
Threads: 26
Joined: Feb 2007
Reputation:
0
Is there a reason why i write % and the chat-box shows # instead?
Posts: 6,129
Threads: 36
Joined: Jan 2009
Yes, because '%' is the placeholder for variables. You can use '%%' to insert a literal percentage sign in format(), but you can't use it directly in chat.
Posts: 1,758
Threads: 157
Joined: Jan 2008
Reputation:
0
% is used with formatting messages. To avoid server crashing, The server replaces % with #.
Posts: 6,129
Threads: 36
Joined: Jan 2009
'%' isn't sent to the text variable, you could for example use str_replace to search for '[percentage]' and try replace it with a literal percentage sign.
Posts: 131
Threads: 26
Joined: Feb 2007
Reputation:
0
I don't get your point? Isn't that what I said I tried above?
Posts: 6,129
Threads: 36
Joined: Jan 2009
Read my post properly.
You cannot search for '%s' in text, as it will be '#', your code searches for '%' and NOT '[percentage]' (my suggestion).