PHP Code:
StartVote()
{
new i;
new title[65];
format(title, 64, "Tech Level %d Vote", iCurrentTechLevel+1);
//Store the menu in the global
gVoteMenu = menu_create(title, "menu_handler");
menu_setprop(gVoteMenu, MPROP_EXIT, MEXIT_NEVER);
//Add some vote options
for(i = 0; i < TECHS_PER_LEVEL; i++)
{
new vote[65];
format(vote, 64, "%s", szTechName[iCurrentTechLevel][i]);
menu_additem(gVoteMenu, vote, i+1, 0);
}
for(i = 0; i < MAX_PLAYERS; i++)
{
bPlayerVoted[i] = false;
}
bInVote = true;
fVoteStartTime = get_gametime();
//We will need to create some variables so we can loop through all the players
new players[32], pnum, tempid;
//Fill players with available players
get_players(players, pnum);
//Start looping through all players to show the vote to
for(i; i<pnum; i++ )
{
//Save a tempid so we do not re-index
tempid = players[i];
//Show the vote to this player
menu_display(tempid, gVoteMenu, 0);
//Increase how many players are voting
gVoting++;
}
return PLUGIN_HANDLED;
}
Code:
for(i = 0; i < TECHS_PER_LEVEL; i++)
{
new vote[65];
format(vote, 64, "%s", szTechName[iCurrentTechLevel][i]);
menu_additem(gVoteMenu, vote, i+1, 0);
}
Quote:
|
Error: Argument type mismatch (argument 3) on line 451
|
__________________