arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 I am totally out of temper! The custom menus are not working properly. Please take a look at this sub:```' Executes when something on a custom menu is clicked.Sub MenuScripts(Index, Clicked_Index, Menu_Type) Dim MenuTitle Dim FieldMessage MenuTitle = getplayermenuclicktitle(Index) FieldMessage = getplayermenuclickmsg(Index) Select Case Menu_Type Case 1 Call CloseCustomMenu(index) Call CustomMenuShow(index, "Miller2", "\GUI\CUSTOM\test.bmp", 1) Call CustomMenuLabel(index, 1," Get out!", 50, 50, 10, 2, 2, 400, 20) Case 2 Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW) Case 3 End SelectEnd Sub```What can be the problem? And if you will help me and get 'em working, i will help you with some web project like registering in your web site or on your refferal link… I really need help with this one! Thanks! Link to comment Share on other sites More sharing options...
Bobosk Posted July 14, 2009 Share Posted July 14, 2009 Are you sure that you're clicking is a picture, and not a label??? because case one is for pictures, while 2 is for fieldmessages, and 3 is for labels.. Link to comment Share on other sites More sharing options...
arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 Yep, I am sure! First I tried this with Labels, and it didn't work. Now I tried with a picture, still nothing… :sad: Link to comment Share on other sites More sharing options...
Guest Posted July 14, 2009 Share Posted July 14, 2009 Do you have a custom menu up?and is it indexed properly? Link to comment Share on other sites More sharing options...
Bobosk Posted July 14, 2009 Share Posted July 14, 2009 wow, can't believe i didn't notice this straight away… it's "CustomMenuClose(Index)" not "CloseCustomMenu(Index)" Link to comment Share on other sites More sharing options...
arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 Oh, yeah Bobosk, it looks like it would be it, ok i'll check… Link to comment Share on other sites More sharing options...
arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 OMG… Still nothing... :( And yeah once one guy made a custom menu for me and it worked, I don't understand why this one isn't working... Link to comment Share on other sites More sharing options...
arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 Bump! :azn: Link to comment Share on other sites More sharing options...
Squiddle Posted July 14, 2009 Share Posted July 14, 2009 Triple posting? Anyways, not sure how nobody saw this, but…You forgot the If Clicked_Index = 0 function ;). It looks more like this:```' Executes when something on a custom menu is clicked.Sub MenuScripts(Index, Clicked_Index, Menu_Type) Dim MenuTitle Dim FieldMessage MenuTitle = getplayermenuclicktitle(Index) FieldMessage = getplayermenuclickmsg(Index) Select Case Menu_Type Case 1 If Clicked_Index = 0 Then Call CloseCustomMenu(index) Call CustomMenuShow(index, "Miller2", "\GUI\CUSTOM\test.bmp", 1) Call CustomMenuLabel(index, 1," Get out!", 50, 50, 10, 2, 2, 400, 20)End If Case 2 Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW) Case 3 End SelectEnd Sub```Or something like that; try it out. You need to make a new Clicked_Index for every custom picutre and label you make ;) Link to comment Share on other sites More sharing options...
arvo95 Posted July 14, 2009 Author Share Posted July 14, 2009 Sorry for triple posting, i am haven't used the modify button, because on my favourite forum it hasn't got one… :( OK anyway I'll try it tomorrow ;) Link to comment Share on other sites More sharing options...
Bobosk Posted July 14, 2009 Share Posted July 14, 2009 @[SB:> [Squi] Squiddle link=topic=48279.msg497244#msg497244 date=1247605487]> Triple posting? Anyways, not sure how nobody saw this, but…> You forgot the If Clicked_Index = 0 function ;). It looks more like this:> > ```> ' Executes when something on a custom menu is clicked.> Sub MenuScripts(Index, Clicked_Index, Menu_Type)> Dim MenuTitle> Dim FieldMessage> > MenuTitle = getplayermenuclicktitle(Index)> FieldMessage = getplayermenuclickmsg(Index)> > Select Case Menu_Type> Case 1> If Clicked_Index = 0 Then> Call CloseCustomMenu(index)> Call CustomMenuShow(index, "Miller2", "\GUI\CUSTOM\test.bmp", 1)> Call CustomMenuLabel(index, 1," Get out!", 50, 50, 10, 2, 2, 400, 20)> End If> Case 2> Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW)> Case 3> > End Select> End Sub> ```> Or something like that; try it out. You need to make a new Clicked_Index for every custom picutre and label you make ;)not having that wouldn't cause it to NOT work though squiddle, and that edit still has```Call closecustommenu(index)```instead of```custommenuclose(index)```and since his script didn't work after he said he replaced that, and seeing no other syntax errors, leads me to believe something else in his main.txt is fouled up. Link to comment Share on other sites More sharing options...
arvo95 Posted July 15, 2009 Author Share Posted July 15, 2009 It is working now!:cheesy: But only on another, clean main… So that means, that something was screwed up with my main earlier... :sad: So as I promised you can ask me to register on some kind of your referral link or In your Website! ;) Thanks!!! :cheesy: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now