• 🏆 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!

[Trigger] Dumb Destroying Triggers Question

Status
Not open for further replies.
Level 4
Joined
Dec 31, 2014
Messages
68
Ok.. this is a really really REALLY dumb & simple question, I'm running over my map to try and attack the remaining memory leaking in my map.
This might have already been answered in another post but upon searching I couldn't find anything exact, so sorry if it already has.

I have some triggers that I have made custom scripts for themselves or other triggers to be destroyed after they are triggered, usually for Single Fire Triggers).
  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Custom script: call DestroyTrigger(gg_trg_TRIGGER_NAME)
Does the custom code have any rules for spaces in-between the (brackets) etc or does it not matter?

I have looked online, seeing some posters that include spaces, some do not but I want to be 100% sure that what I have done with my triggers is correct or not. (or if this even matters in the slightest) As I don't know for sure when each trigger is destroyed I can't test.

So For Example here I will type :ogre_rage: where a space would be just so that it is clear,

the custom code GetTriggeringTrigger, is it;

Custom script: call DestroyTrigger:)ogre_rage:GetTriggeringTrigger():ogre_rage:)

or is it

Custom script: call DestroyTrigger(GetTriggeringTrigger())







the custom code gg_trg_TRIGGER_NAME, is it;

Custom script: Call DestroyTrigger:)ogre_rage:gg_trg_TRIGGER_NAME:ogre_rage:)

or is it

Custom script: call DestroyTrigger(gg_trg_TRIGGER_NAME)

Or.. if there is something else iv done wrong what should it be?
Thanks
 
Level 19
Joined
Jul 14, 2011
Messages
875
Spaces and tabs make no difference in JASS. Only new lines do but that isnt relevant in GUI.
It depends on your personal prefference; I prefer to put spaces only after commas and not before/after parenthesis.

E: Also, JASS is case sensitive, so call is not the same as Call or CALL.
 
Level 4
Joined
Dec 31, 2014
Messages
68
Oops didn't mean to put that capital letter at the start of Call for the 3rd example. Oh right OK that's great - I wanted to rule out bad custom scripting on my part before trying to track down more problems. Thanks for that.
 
Status
Not open for further replies.
Top