I've been using this code for many months for my chatbot to help people in dreadsylvania with element, and monster banishing.
I only just found out today that if a user has a space in their name, the script aborts.
I did not write this, it was written for me.
Here's the error I'm getting:
int NE= count(ChatLog);
string [int] my_list;
file_to_map( "chatlog.txt" , my_list);
string temp = "";
string user = "";
foreach i,playername in my_list
player = GetPlayer( playername );
if( player.name != "" )
if( temp != "" ) temp += ", ";
temp += player.clanname;
user += player.name;
cli_execute("/whitelist " + temp);
if (temp != get_clan_name())
chat_private(user, "I couldn't join your clan " + temp +", perhaps I don't have a whitelist?");
I'm not sure how to fix this... Is there anyone who sees the problem?
Incoming PM from Paz Sox saying: testhot
Player "Paz Sox" not found!
Sorry, you don't seem to be cool enough to have a whitelist for a clan like ''.
Unknown recipient "I". Message (couldn't join your clan , perhaps I don't have a whitelist?) not sent.