• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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: 36
Status
Not open for further replies.
Top