Here's a part of custom translit plugin to translate symbols and add some info to msg.
PHP Code:
new p_Name[32]
get_user_name(id,p_Name,31)
format (s_Out, 191, "^1%s", p_Name)
if (get_user_flags(id) & ADMIN_CHAT)
{
s_Out += format (s_Out, 191, "^1[^4Admin^1]:^4")
s_Color = true
}
else s_Out += format (s_Out, 191, "^3 ");
s_Out += format (s_Out, 191, " %s", sz_Msg)
if ( s_Transl || s_Color )
{
client_printcolor(0,s_Out)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
In few lines, where i try to plus existed content with new content
returns
PHP Code:
error 023: array assignment must be simple assignment
PHP Code:
s_Out += format (s_Out, 191, "^1[^4Admin^1]:^4")
else s_Out += format (s_Out, 191, "^3 ");
s_Out += format (s_Out, 191, " %s", sz_Msg)
Why should it be wrong?
I assume it should work because i don't know another way to plus strings.