[HELP] Error into my Menu
#1

i got errors in this:

Код:
shop = CreateMenu("Weapon Shop", 2, 50.0, 180.0, 200.0, 200.0);

AddMenuItem(Shop, 0, "AK-47");
AddMenuItem(Shop, 1, "2000$");
error 017: undefined symbol "shop"

Why?
Reply
#2

Quote:
Originally Posted by Smiths
error 017: undefined symbol "shop"

Why?
you have to
pawn Код:
new
the menu shop...

pawn Код:
new Menu:shop
Reply
#3

not working.. i already got this codes....

this is all my code for the menu
pawn Код:
new Menu:shop

shop = CreateMenu("Weapon Shop", 2, 50.0, 180.0, 200.0, 200.0);

AddMenuItem(Shop, 0, "AK-47");
AddMenuItem(Shop, 1, "2000$");

public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == Shop)
  {
    switch(row)
    {
      case 0:{
        GivePlayerWeapon(playerid, 30, 1000);
      }
    }
  }
  return 1;
}
Reply
#4

pawn Код:
//==== TOP OF SCRIPT
new Menu:shop
//==== OnGameModeInit(OnFilerScriptInit)
shop = CreateMenu("Weapon Shop", 2, 50.0, 180.0, 200.0, 200.0);

AddMenuItem(Shop, 0, "AK-47 - 2000$");

//========== OnPlayerSelectetedMenuRow
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == shop)
  {
    switch(row)
    {
      case 0:
      {
        GivePlayerWeapon(playerid, 30, 1000);
 GivePlayerMoney(playerid, -2000);
     }
    }
  }
  return 1;
}
Reply
#5

i know that....
Reply
#6

Quote:
Originally Posted by Smiths
i know that....
whats exactly not workin?
Reply
#7

i got all this errors:

C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(40) : error 017: undefined symbol "shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(42) : error 017: undefined symbol "Shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(43) : error 017: undefined symbol "Shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(45) : warning 217: loose indentation
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(195) : error 017: undefined symbol "Shop"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#8

Quote:
Originally Posted by Smiths
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(40) : error 017: undefined symbol "shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(42) : error 017: undefined symbol "Shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(43) : error 017: undefined symbol "Shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(195) : error 017: undefined symbol "Shop"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
at first i would write shop everytime lowercase (cause
pawn Код:
new Menu:shop
is lowercase, too)
Reply
#9

i still got :

C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(40) : error 017: undefined symbol "shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(42) : error 017: undefined symbol "shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(43) : error 017: undefined symbol "shop"
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(45) : warning 217: loose indentation
C:\Documents and Settings\Daniel\Desktop\SAMP SERVER\gamemodes\test.pwn(195) : error 017: undefined symbol "shop"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#10

Bump. Please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)