• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

need help with some trigger errors

Status
Not open for further replies.
Level 1
Joined
Nov 28, 2009
Messages
5
good evening.

i am working on a HeroWars remake currently for SC2 and i have some weird errors right now, that i simply can't find the reason for.

i added some relative huge things to the map recently, but im not really sure if these might be the problem, and if so - where exactly.

the thing is this - i have an system that opens an dialog based attribute purchase system for an hero that walks in the desired region that is surrounding an building.

the dialog opens, you can buy you attributes and just leave - worked perfectly last days.
now it starts spitting these errors, and i cant find the reason.

i will attach some screenshots of the errors and functions/triggers - any help would be really nice, and if its needed i would also upload the map itself.

kind regards, PatchOne
 

Attachments

  • trigger_choosen.png
    trigger_choosen.png
    157.6 KB · Views: 76
  • trigger_func.png
    trigger_func.png
    175.4 KB · Views: 97
  • triggerErrors.png
    triggerErrors.png
    98 KB · Views: 108

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
It may be possible that the un it types (hero types) you are referencing are bugging in some way. I would personally add debug comments to try and find where the fault occurs exactly and then work on fixing that line as it is hard to tell which line causes the fault with the data given.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
The problem is that you incorrectly use the Event. This trigger fires when ANY player click ANY button in ANY dialog.
So, what you need to do:
1) Disable this trigger as soon as all heroes are selected.
2) Either delete this event and use a specific events for all of the buttons (use custom script to add several events for this trigger, one for each of the buttons), OR check whether player actually clicked any of the buttons, not some other button on some other dialog. A simple "Skip remainig actions" in the "default" tag of the switch should do the job.

Also, I found following errors (unrelated to your problem):
1) The dialog is beeing hidden for (Active players), while you propably want everyone to click it.
2) You just hide the dialog and don't check wheter the player has already chosen a hero. While in test mode that is no problem, on b.net player will be able to spam-click the dialog button and spawn a horde of heroes.
 
Level 1
Joined
Nov 28, 2009
Messages
5
The problem is that you incorrectly use the Event. This trigger fires when ANY player click ANY button in ANY dialog.
So, what you need to do:
1) Disable this trigger as soon as all heroes are selected.
2) Either delete this event and use a specific events for all of the buttons (use custom script to add several events for this trigger, one for each of the buttons), OR check whether player actually clicked any of the buttons, not some other button on some other dialog. A simple "Skip remainig actions" in the "default" tag of the switch should do the job.

Also, I found following errors (unrelated to your problem):
1) The dialog is beeing hidden for (Active players), while you propably want everyone to click it.
2) You just hide the dialog and don't check wheter the player has already chosen a hero. While in test mode that is no problem, on b.net player will be able to spam-click the dialog button and spawn a horde of heroes.

thanks! i actually found that out already yesterday, but that was exactly the problem.

also thanks for the "bugs" you found in my code, i was aware of thathiding for active players but not that other one - helped me a lot!
 
Status
Not open for further replies.
Top