PHP Code:
menu_additem(CC_menu, "\wSweden", "Sweden");
menu_additem(CC_menu, "\wFinland", "Finland");
I would like to get the name of chosen country in my handler ...
PHP Code:
new data[6], iName[64];
new _access, callback;
menu_item_getinfo(CC_menu, item, _access, data, charsmax(data), iName, 63, callback);
new iCountry = str_to_num(data);
switch( iCountry )
{
default:
{
copy(iSelectedCountry[id], 32, iCountry);
client_print(id, print_chat, "selected country %s", iSelectedCountry[id])
}
}
menu_destroy(CC_menu);
return PLUGIN_HANDLED;
}
What is wrong it gives me error:
Error: Argument type mismatch (argument 3)