| 07-18-2004, 05:50 AM | #1 |
Ugh, I've been working on some dialog boxes all day and all I've learned after hours of work and deleting entire systems because of some shitty bug: DIALOGS ARE THE DEVIL INCARNATE. Now I found SuperIki's dialog engine, and it's been going well, but I want to dynamically create the dialog titles. I'm no JASS guru, all I know about it is common sense from knowing C++ (call me lazy, I prefer using the gui). Here's what I'm trying to do: call DialogSetMessage(d,title) where d is a local dialog box and title is an argument for this function: function MakeDialog takes integer pid, string title... and I'm trying to make this call: call MakeDialog(GetPlayerId(GetTriggerPlayer()), udg_PlayerLocation[(GetConvertedPlayerId(GetTriggerPlayer())+1)]... The +1 is because I'm mainly using the gui with this variable and JASS starts off at 0 index rather than 1 for player number. However, it's simply not working. Does anyone know why? |
| 07-18-2004, 09:54 PM | #2 |
To dynamically create the titles, just call MakeDialog with a different title. The string you pass to that function as the 2nd parameter will become the title. Don't try to mess around with DialogSetMessage while using the engine triggers. It will all work fine if you just put a string as second parameter. Look at the dialog engine files to learn how to use it. Good luck. |
| 07-18-2004, 10:00 PM | #3 |
Sorry I should have been clearer. I just put DialogSetMessage() there to show how it actually sets the title, I'm not calling it myself, I'm doing makedialog() just as you said. I guess it's a problem with udg_PlayerLocation[(GetConvertedPlayerId(GetTriggerPlayer())+1)]. Does anyone see a syntax error with it? I'll look into this... |
| 07-18-2004, 10:06 PM | #4 |
If PlayerLocation is a string array, it should work. Does it give a syntax error? |
| 07-18-2004, 10:42 PM | #5 |
Fixed it! Was a problem in my string array changing triggers, thanks for the help (and the great functions!) If all goes well I'll only need one trigger to make the dialog box. |
| 07-19-2004, 03:51 AM | #6 |
Dialogs are so easy now a days. Just download vex's great function (at the vault InputMsgI ) and you are all set. Now item based menus, and abilities FUCK those are the devil my friend. |
| 07-19-2004, 08:15 AM | #7 |
Yes I know, you have the problems of displaying the abilities/items without an assload of if/elses along with lack of space to display them all. I think I'm going to go with local multiboards for that, but it'll still be a pain in the ass (more space, more triggering pains). Of course that means getting deeper into JASS, but shitty syntax aside it's not so bad. |
