Im getting a lot of compiler errors with the menu area of this code...
im using code from this area of the page,
https://wiki.alliedmods.net/Commands...eMod_Scripting)
the errors are
/groups/sourcemod/upload_tmp/textTu3Hvq.sp(74) : error 029: invalid expression, assumed zero
/groups/sourcemod/upload_tmp/textTu3Hvq.sp(74) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textTu3Hvq.sp(74) : error 001: expected token: ";", but found "int"
/groups/sourcemod/upload_tmp/textTu3Hvq.sp(74) : error 001: expected token: ";", but found "("
/groups/sourcemod/upload_tmp/textTu3Hvq.sp(74) : fatal error 189: too many error messages on one line
thanks m8
#include <sourcemod>
#include <sdktools>
////////////////////////////////////////////////////
////////////////////////////////////////////////////
/// ///
/// ///
/// Flynn's ///
/// ///
/// TTT ///
/// ///
/// ///
/// ///
/// ///
/// ///
/// ///
/// ///
/// ///
/// ///
/// ///
////////////////////////////////////////////////////
////////////////////////////////////////////////////
#include <sourcemod>
#include <sdktools>
public void OnPluginStart()
{
RegAdminCmd ("sm_TTT_over", Command_TTT_over, ADMFLAG_ROOT);
RegAdminCmd ("sm_TTT", Command_TTT, ADMFLAG_ROOT);
RegConsoleCmd("Menu_TTT_terrorist", Menu_TTT_terrorist);
RegConsoleCmd("Menu_TTT_Civillian", Menu_TTT_Civillian);
PrintToServer("mp_friendlyfire 1");
PrintToServer("mp_respawnwavetime 99999999999999999999999");
PrintToChatAll("!sm_classrestrict_blu_scouts" );
}
public Action Command_TTT_over(int client, int args)
{
PrintToServer("mp_friendlyfire 0");
PrintToServer("mp_respawnwavetime 0");
PrintToChatAll("!sm_classrestrict_enable 0");
}
public Action Command_TTT(int client, int args)
{
new Client;
if(GetTeamClientCount(2)>0)
{
do {
Client = GetRandomInt(1, MaxClients);
}
while(!IsClientInGame(Client) || GetClientTeam(Client) != 3);
}
for(new i = 1; i <= MaxClients; i++) {
RegConsoleCmd("Menu_TTT_terrorist", Menu_TTT_terrorist);
}
new Client2;
if(GetTeamClientCount(2) > 0) {
do {
Client2 = GetRandomInt(1, MaxClients);
}
while(!IsClientInGame(Client2) || GetClientTeam(Client2) != 3);
}
for(new i = 1; i <= MaxClients; i++) {
RegConsoleCmd("Menu_TTT_Civillian", Menu_TTT_Civillian);
}
public int MenuHandler1(Menu menu, MenuAction action, int param1, int param2)
{
/* If an option was selected, tell the client about the item. */
if (action == MenuAction_Select)
{
char info[32];
bool found = menu.GetItem(param2, info, sizeof(info));
PrintToConsole(param1, "You selected item: %d (found? %d info: %s)", param2, found, info);
}
/* If the menu was cancelled, print a message to the server about it. */
else if (action == MenuAction_Cancel)
{
PrintToServer("Client %d's menu was cancelled. Reason: %d", param1, param2);
}
/* If the menu has ended, destroy it */
else if (action == MenuAction_End)
{
delete menu;
}
}
public int MenuHandler2 (Menu menu, MenuAction action, int param1, int param2)
{
/* If an option was selected, tell the client about the item. */
if (action == MenuAction_Select)
{
char info[32];
bool found = menu.GetItem(param2, info, sizeof(info));
PrintToConsole(param1, "You selected item: %d (found? %d info: %s)", param2, found, info);
}
/* If the menu was cancelled, print a message to the server about it. */
else if (action == MenuAction_Cancel)
{
PrintToServer("Client %d's menu was cancelled. Reason: %d", param1, param2);
}
/* If the menu has ended, destroy it */
else if (action == MenuAction_End)
{
delete menu;
}
}
}
public Action Menu_TTT_terrorist(int client, int args)
{
Menu menu = new Menu(MenuHandler1);
menu.SetTitle("Terrorist");
return Plugin_Handled;
}
public Action Menu_TTT_Civillian(int client, int args)
{
Menu menu = new Menu(MenuHandler2);
menu.SetTitle("You are a Civilian");
return Plugin_Handled;
}