Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

WTF Is with the custom menus? (solved)


arvo95
 Share

Recommended Posts

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 Select
End 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

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 ;)
Link to comment
Share on other sites

@[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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...