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

when removing leaks

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2011
Messages
139
does the space matters? example:

Custom script: call DestroyGroup(udg_GroupVar)
Custom script: call DestroyGroup (udg_GroupVar)

another example:

Custom script: call RemoveLocation (udg_Temp_Point)
Custom script: call RemoveLocation(udg_Temp_Point)

wich is the right one? ty
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
does the space matters? example:

Custom script: call DestroyGroup(udg_GroupVar)
Custom script: call DestroyGroup (udg_GroupVar)

another example:

Custom script: call RemoveLocation (udg_Temp_Point)
Custom script: call RemoveLocation(udg_Temp_Point)

wich is the right one? ty

I never use a space there. It might work with a space too, but I don't like writing more than I need to.
 
Level 7
Joined
Nov 15, 2009
Messages
225
more opinnions? just want to be sure

:xxd:

Here, test it with this function, or play the attached map.

JASS:
scope Test initializer Init

    function Init takes nothing returns nothing
    
        local     string   s    =   "You just created a "
        local     player   p    =   Player  (    0     )
        local     unit     u    =   CreateUnit(   p    ,   'hfoo'    ,      0    ,       0    ,      0     )
        local location loc = Location(200, 200) // Just for testing the function
        
        call DisplayTimedTextToPlayer   (GetLocalPlayer  ()   ,     0 ,  0,10,  s + GetUnitName  (   u  ) + "."  )
        
        call RemoveLocation    (   loc   )
        
        set     s =  null
        set p   =               null
        set         u           =               null
        set loc = null
        
        call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,10,"If you can read this message ingame your function works fine.. :)")
    
    endfunction

endscope
 

Attachments

  • Space Test.w3m
    15.9 KB · Views: 35
Status
Not open for further replies.
Top