Hello coders! I'm trying to make message from rows defined in array, but getting
error 001: expected token: "]", but found "-identifier-".
Can someone help me to fix it?
Here's problem code:
PHP Code:
new const BHP2_HEADER[] = "^n* Possible arguments:^n"
new const BHP2_HELP[][128] = {
"* help - show this message^n",
"* toggle - toggle bhop^n",
"* autojump <1 | 0> - toggle autojump^n",
"* list - show bhop users list^n" }
new const BHP2_FOOTER[] = "***"
new xbh_help_msg[1024]
public xbhop_help(id)
{
new i
format(xbh_help_msg, charsmax(xbh_help_msg), "%s", BHP2_HEADER)
for(i=0; i < 3; i++)
{
// PROMBLEM CODE IS BELOW
add(xbh_help_msg, charsmax(xbh_help_msg), BHP2_HELP[i], charsmax(BHP2_HELP[i])) //ERROR COMES HERE
// PROMBLEM CODE IS ABOVE
}
add(xbh_help_msg, charsmax(xbh_help_msg), BHP2_FOOTER, charsmax(BHP2_FOOTER))
client_print(id, print_console, xbh_help_msg)
return PLUGIN_HANDLED
}