1 error with adding a menu
#1

this is the error i get from this script:
Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44829) : error 021: symbol already defined: "AddMenuItem"
im trying to do this:
Код:
public ShowMenuMafia()
	MafiaMenu1 = CreateMenu("Mafia Teleports", 2, 125, 150, 300);
	AddMenuItem(MafiaMenu1, 0, "Roof");
	AddMenuItem(MafiaMenu1, 1, "Hq Roof");
	AddMenuItem(MafiaMenu1, 0, "Graveyard");
	AddMenuItem(MafiaMenu1, 1, "Hq Graveyard");
}
Reply
#2

Wheres the opening brace? eg {
Reply
#3

You're missing the opening brace, make the code like this:"

pawn Код:
public ShowMenuMafia()
{
    MafiaMenu1 = CreateMenu("Mafia Teleports", 2, 125, 150, 300);
    AddMenuItem(MafiaMenu1, 0, "Roof");
    AddMenuItem(MafiaMenu1, 1, "Hq Roof");
    AddMenuItem(MafiaMenu1, 0, "Graveyard");
    AddMenuItem(MafiaMenu1, 1, "Hq Graveyard");
}
If you still get an error, post back
Reply
#4

thank you no errors.
But whats Tag missmatch mean?
Reply
#5

Post the warning
Reply
#6

Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(42166) : warning 203: symbol is never used: "str"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44828) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44829) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44830) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44831) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44832) : warning 213: tag mismatch
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44894) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(44894) : warning 203: symbol is never used: "adminspec"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:      8972 bytes
Code size:     1626036 bytes
Data size:     3677992 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4982 cells (19928 bytes)
Total requirements: 5329384 bytes

8 Warnings.
Oh also i got another problem now Whenever i go to the pickup icon my server closes out (the .exe)
i think i messed up with the public thing here is the code of the public
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if (pickupid == MafiaWeps)
	{
		SetPlayerPos(playerid,2137.6677,-2273.7737,14.7734);
		}
	if (pickupid == MafiaTele)
	{
		ShowMenuForPlayer(Mafia,playerid);
		}
		return 1;
 }
Please help
Reply
#7

Make sure you create the menu before you try to show it to a player.
Reply
#8

I did do createmenu..
Reply
#9

Is that Code correct cuz everytime i try to go into the pickup icon it doesnt do anything and it shuts off my .exe to run the server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)