I'm trying to make an round menu plugin, but I have a problem with the two diminsion arrays when compiling it gives a tag mismatch error, everything is explained in the code:
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Rounds Menu"
#define VERSION "1.0"
#define AUTHOR "Khalid"
#define FLAG ADMIN_MAP
new bool:bNextRound = false
//new bool:knife, bool:usp, bool:deagle, bool:m4a1, bool:ak, bool:awp
new Bool:Round_forwards[][] = { //This was made as a boolean to check which round type is used
"fw_Knife", // 0
"fw_USP", // 1
"fw_Deagle", // 2
"fw_M4A1", // 3
"fw_AK-47", // 4
"fw_AWP" // 5
}
new gKeys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /rounds", "rounds_menu", FLAG)
register_menucmd(register_menuid("Choose next round type"), gKeys, "menu_handler")
register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
}
public rounds_menu(id, level, cid)
{
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
static menu[128]
format(menu, 127, "Choose the next round:^n1. Knife round^2. USP round^n3. Deagle round^n4. M4A1 round^n5. AK-47 round^n.6. AWP round")
show_menu(id, gKeys, menu)
}
public menu_handler(id, key)
{
switch(key)
{
case 0:
Round_forwards[0] = true
case 1:
Round_forwards[1] = true
case 2:
Round_forwards[2] = true
case 3:
Round_forwards[3] = true
case 4:
Round_forwards[4] = true
case 5:
Round_forwards[5] = true
}
}
public eNewRound()
{
static round_name[50]
for(new i; i < 6; i++) // from 0 Until 5
{
if(Round_forwards[i] == true)
{
set_task(0.2, Round_forwards[i], 0) // This was supposed to replace the Round_forwards with
// the correct forward to start the round
}
else return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
// Finally set_task forwards
public fw_knife()
{
// round handler
}
public fw_m4a1()
{
// Round handler
}
public fw_usp()
{
// Round handler
}
// etc...