| 05-27-2003, 05:13 PM | #1 |
Okay, this is, well, my map... (Don't try to steal this). Can someone tell me what's wrong? Take a look at both the trigger for paying sellers, there is a "stop" so they can't make a negative number. But it doesn't work. And my Gamble dialog wont show up when you type Gamble, as you are supose to. Please tell me how to fix these. (Attaching pictures below). |
| 05-27-2003, 05:17 PM | #2 |
Two more. |
| 05-27-2003, 05:20 PM | #3 |
Last one (Thanks in advance for any help) |
| 05-27-2003, 05:58 PM | #4 |
In your first trigger, you have the action... if ((Entered chat string) Equal to <0) .... The only way this would be possible is if you did a string comparison and entered "<0" as the string to compare. I think what you want to do is flip the if and the Set entered_gold so you can do an integer comparison... Set entered_gold = (Integer((Substring((Entered chat string), 7, 14)))) if (entered_gold) Less than 0 .... I haven't messed with Dialog's, so can't help there, sorry. The only thing I notice is that you are running the triggers checking conditions, yet the actual trigger you do not show the conditions available (cuts off at the top of Actions). |
| 05-27-2003, 07:47 PM | #5 |
In this case, conditions wouldn't have anything to do with it. It just tells it to read, if any, conditions, or to just overrun them. Yes... I could compare it, that would work. If entered_gold = <0 then skip remaning actions else do nothing ... Yes, that must work. Okay, I need dialog help people! |
| 05-27-2003, 07:48 PM | #6 |
Can the title lengh bug it so that it wont display? (Just a thought I had) |
| 05-28-2003, 12:29 PM | #7 |
... i'll give you a tip for further problems. If you are running into a weird problem like yours, create an empty map, copy the triggers that seem to be buggy into it and "debug" them. Thats what programmers do when they are running into some weird bugs. ;) Creating a "Test Environment". I've did that now for you because the triggers all seemed to be ok for me. And the triggers ARE ok at all. It's not the "Title length bug" too. The problem is that you're using a "Dialog Array" Variable. This won't work ... don't ask me why. Try a normal (single) Dialog Variable (array unchecked) and it will work. Maybe this is a bug ... maybe not ... maybe there are other functions/methods for Dialog Arrays. I don't know any. What's the goal of this map ? Casino style ? :ggani: |
| 05-28-2003, 12:40 PM | #8 |
Just a thought...since you are using a Dialog array, you probably have to initialize the dialog index by creating a dialog and setting it to the index position. This is the same problem that plagues Unit Groups. When you use arrays, WE has no idea how many unit groups you need, and does not create a new unit group for all available array positions, you must do it yourself. I'm willing to bet this is the problem with you using Dialog arrays, and you have to create a dialog at the appropriate index before it will work. |
| 05-28-2003, 12:54 PM | #9 |
mmh ... but how do you "create dialogs" exactly. There is no "Dialog - Create Dialog" Method. Or am i too blind to find it ... ://// |
| 05-28-2003, 01:09 PM | #10 |
The dialog is a variable. You then display the variable, being the dialog. You first add buttons to the dialog variable, binding them to dialog button variables. I did arrays for mine, since I have 8 players all needing seperate variables for everything that relates to gamble. Instead of doing 1 new named something for every I do 1 named Something and then there is an index [X] of what variable I need in there. |
| 05-28-2003, 01:12 PM | #11 |
emote_sweat Ähm ... have you read our posts above Dead-Inside ... i mean rwxr-xr-r's and mine about "Dialog Arrays" ? They don't work. |
| 05-28-2003, 01:24 PM | #12 |
Dead-Inside, I do believe I am correct in this. The problem with Unit Group arrays holds in that you can't create one, then expect to be able to add units to a specific index. When you create a variable Unit Group (global), WE automaticly does the equivilant of... set udg_myUnitGroup = CreateGroup() However, it does NOT do this for arrays. You must do it yourself. Unfortunately, the equivilant function call is not in the editor, so you must convert your trigger to custom text, and do it manualy for each array position you want a Unit Group for. I do a lot of my triggers in JASS, and even when I create a local variable of type group, I must set it with a call to CreateGroup(). Taking the above into consideration, when you create a Dialog variable, WE does the same thing it would do for a Unit Group variable... set udg_myDialog = DialogCreate() Again, this is a function call, but there are no GUI triggers for it, so you have to convert your trigger to custom text and do it manualy for each array position you want a dialog for... set udg_Dialog[1] = DialogDialog() set udg_Dialog[2] = DialogDialog() etc... You could do this in a Map Initialization trigger to seperate it from your GUI triggers. I'm 99% positive this will fix your problem. |
| 05-28-2003, 01:52 PM | #13 |
If you dont want to convert most of your triggers into Custom Text you may do the following: - extract the "war3map.j" file from your map.w3m - edit it with your favourite texteditor and add these line to the InitGlobals function: set udg_Dialog[0] = DialogCreate() set udg_Dialog[1] = DialogCreate() ... and so on like rwxr-xr-x said Now delete "war3map.j" in your w3m file and add the edited one to it. et voila ... thats it ;) |
| 05-28-2003, 02:04 PM | #14 |
I find it much easier to do things within the editor than extracting the .j file and editing it, though it certainly would work. However, since I try to avoid global variables when they aren't needed, I'm curious if editing the map at a later date and saving it would cause WE to overwrite your changes in the InitGlobal section. The reason I ask is that those actions are not being performed by WE when you create a Dialog array. If they do get overwritten, which to me is logical that they would, seems to be a lot of extra work to create a few Dialogs. If they don't, certainly a viable alternative. |
| 05-28-2003, 02:38 PM | #15 |
*my brain hurts* So... Exactly what do you need to do here? I know jack about JASS editing so tell me. |
