• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Force enable trigger

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2023
Messages
14
Hey, I opened a map in the editor that I played as recently as today. I didn't edit any of the code in the trigger, but I accidentally disabled it. Now when I try to reenable it it doesn't compile because it doesn't recognize the variable udg_MapName. It is true that the variable is not defined elsewhere but it ran earlier with identical code.
The error is prompting on:
call PreloadGenEnd("Grabiti's RPG Creator"+"\\"+udg_MapName+"\\"+fileName+".txt")
Is there a way I can force enable the trigger?
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,640
Create a String variable called MapName then re-enable the trigger. This variable is used in the naming of the save file in the CustomMapData folder so you probably want to set it to the value that was being used before.

Also, if you're on patch 1.33+, make sure to enable JassHelper when opening maps since it's disabled by default now.
 
Last edited:
Level 3
Joined
Jan 16, 2023
Messages
14
Create a String variable called MapName then re-enable the trigger. This variable is used in the naming of the save file in the CustomMapData folder so you probably want to set it to the value that was being used before.

Also, if you're on patch 1.33+, make sure to enable JassHelper when opening maps since it's disabled by default now.
Thanks again. I actually considered this but assumed it was some inherent variable which would cause some conflicts since it was working before without declaration.
I tried adding the string variable with the actual map name as it's value but while it compiles now, I get an unexpected error when I run the map. I can't rule out that I may have accidentally messed up some other part of the code though, I may need to download a fresh version(I forgot to back-up the original).
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,640
Thanks again. I actually considered this but assumed it was some inherent variable which would cause some conflicts since it was working before without declaration.
I tried adding the string variable with the actual map name as it's value but while it compiles now, I get an unexpected error when I run the map. I can't rule out that I may have accidentally messed up some other part of the code though, I may need to download a fresh version(I forgot to back-up the original).
What's the error? And did you just write what you thought was the map name or actually reference an existing save file to figure it out? Also, make sure the variable is set before saving/loading occurs.
 
Last edited:
Level 3
Joined
Jan 16, 2023
Messages
14
What's the error? And did you just write what you thought was the map name or actually reference an existing save file to figure it out? Also, make sure the variable is set before saving/loading occurs.
It's just an unexpected error when I run the map. I did reproduce the map name from a file name and hard set its initial value.
 
Status
Not open for further replies.
Top