[HELP]Aid with a menu [Solved]
#1

Hello to all I have the following problem creates a menu following the passages of a manual but it gives the following error me:
Код:
C:\Documents and Settings\Peruxxo\Escritorio\minigun.pwn(75) : error 021: symbol already defined: "AddMenuItem"
C:\Documents and Settings\Peruxxo\Escritorio\minigun.pwn(77) : error 010: invalid function or declaration
C:\Documents and Settings\Peruxxo\Escritorio\minigun.pwn(77 -- 79) : error 010: invalid function or declaration
C:\Documents and Settings\Peruxxo\Escritorio\minigun.pwn(77 -- 81) : error 010: invalid function or declaration
C:\Documents and Settings\Peruxxo\Escritorio\minigun.pwn(77 -- 81) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
As I solve east problem?
edit:
Neat error
Reply
#2

Post your script here in pastebin.
Only errors wont help us help you.

/Artix
Reply
#3

code:
Код:
#include <a_samp>
#include <core>
#include <float>
new Menu:ammunation;

#pragma tabsize 0
#define FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA

#define NUMVALUES 4
#if defined FILTERSCRIPT
forward SendPlayerFormattedText(playerid, const str[], define);
forward public SendAllFormattedText(playerid, const str[], define);
forward GameModeExitFunc();
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("english:");
	print("minigunshop fake V2.0");
	print("by");
	print("[sXe]m3rc3nari0");
	print("--------------------------------------");
	print("espaсol:");
	print("minigunshop fake v2.0");
	print("creado por");
	print("[sXe]m3rc3nari0");
	print("------------------------------------\n");
	AddMenuItem(ammunation, 1, "comprar");
  AddMenuItem(ammunation, 1, "salir");
	return 1;
}

public OnFilterScriptExit()
{
  DestroyMenu(ammunation);
	return 1;
}

#else

#endif

public OnPlayerConnect(playerid)
{
	SendPlayerFormattedText(playerid, "este server posee la opcion de comprar minigun por favor pon /miniguninfo", 0);
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
 {
  new cmd[256];
  new idx;
  cmd = strtok(cmdtext, idx);
  
  if(strcmp(cmd, "/miniguninfo", true) == 0) {
		SendPlayerFormattedText(playerid,"Bienvenidos para comprar una minigun pon.",0);
		SendPlayerFormattedText(playerid,"/mcomprar",0);
		SendPlayerFormattedText(playerid,"script creado por [sXe]m3rc3nari0",0);
}
  if(strcmp(cmd, "/mcomprar", true) == 0) {
  ShowMenuForPlayer(ammunation, playerid);
  return 1;
  }
  return 0;
}
//line
OnGameModeInt()
ammunation = CreateMenu("minigunshop", 1, 200.000000, 200.000000, 100.000000, 100.000000);
AddMenuItem(ammunation, 1, "comprar");
AddMenuItem(ammunation, 1, "salir");
OnPlayerSelectedMenuRow(playerid, row)
  new Menu:CurrentMenu = GetPlayerMenu(playerid);
  if(CurrentMenu == ammunation)
  {
    switch(row)
    {
      case 0:
      {
      //code
      }
      case 1:
      {
      //code
      }
    }
  }
public SendPlayerFormattedText(playerid, const str[], define)
{
	new tmpbuf[256];
	format(tmpbuf, sizeof(tmpbuf), str, define);
	SendClientMessage(playerid, 0xFF004040, tmpbuf);
}
strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
Reply
#4

help plis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)