Jump to content


Photo

Show_menu not working


  • This topic is locked This topic is locked
5 replies to this topic

#1 Jacepwns21

Jacepwns21

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM8

Posted 07 May 2012 - 01:12 AM

hello i have a problem with the show_menu
take a look
if argument0 = spr_Sword_basic
{
show_menu("Equip|Drop|Examine",-1)
if menu =(0)
{
if global.right_arm = "free"
{
global.Attack +=2
global.right_arm = "Wooden Sword"
delete_item(spr_Sword_basic,obj_Sword_basic)
}
else if global.left arm = "free"
{
global.Attack +=2
global.left_arm = "Wooden Sword"
delete_item(spr_Sword_basic,obj_Sword_basic)
}}}
if menu =(1){drop_item(spr_Sword_basic)}
if menu =(2){script_execute(scr_custombox,font_1,bck_button,1,spr_button,"Wooden Sword# Attack +2")}

this is in the right click of the inventory tile (dont worry the postionaing in corrent) but when i try to right click any item i get this



___________________________________________
ERROR in
action number 1
of Mouse Event for Glob Right Pressed
for object obj_inventory:

In script right_inventory:
In script check_item_right:
Error in code at line 4:
if menu =(0)
^
at position 5: Unknown variable menu


but when it does work and i drop it it drops all the items or i examine and it examines all the items can you help me i have been working on it for 3 days
  • 0

#2 Jacepwns21

Jacepwns21

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM8

Posted 07 May 2012 - 02:25 AM

*****g come on guys this is killing me
  • 0

#3 Jacepwns21

Jacepwns21

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM8

Posted 07 May 2012 - 03:57 AM

****ING HELL COME ON I HAVE MADE 3 THREADS ON EACH FOURM I NEED TO FIX THIS PROBLEM I HAVE BEEN WORKING ON IT FOR 3 DAYS HURRY THE FUK UP PLEASE PLEASE OMEONE FIND A SOLOUTION ANYTHING
  • 0

#4 BBGaming

BBGaming

    Programmer

  • GMC Member
  • 2470 posts
  • Version:GM7

Posted 07 May 2012 - 04:47 AM

You're never going to get an answer asking like that. It's only been 3 hours. This forum isn't yours personally; other members answer questions out of their own time for nothing in return, and they have no obligation to give you an answer as you see fit.

Your problem is you need to save the result of show_menu into a variable, in this case the variable 'menu', right here:
show_menu("Equip|Drop|Examine",-1)
Replace that with this:
menu = show_menu("Equip|Drop|Examine",-1)
The polite thing to do now would be to apologize.

Edited by BBGaming, 07 May 2012 - 04:48 AM.

  • 1

#5 Jacepwns21

Jacepwns21

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM8

Posted 07 May 2012 - 06:46 AM

i am sorry i was very mad and stressed thank you i am going to check if it works
  • 0

#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16028 posts
  • Version:GM:Studio

Posted 07 May 2012 - 07:22 AM

Pay attention to the error next time

if menu =(0)
^
at position 5: Unknown variable menu

And btw, we are not your little slaves to be ordered around.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users