• 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.

[JASS] whats wrong?

Status
Not open for further replies.
Level 7
Joined
Mar 22, 2010
Messages
228
JASS:
function Trig_Melee_Initialization_Actions takes nothing returns nothing
    local integer i = 0
    loop
        exitwhen i == 8
        local unit u = CreateUnitAtLoc( Player(0), 'hfoo', GetRectCenter(GetPlayableMapRect()) ) //error
        set i = i + 1
        call TriggerSleepAction( 0.01 )
    endloop
endfunction
help
 
Last edited:
Level 7
Joined
Mar 22, 2010
Messages
228
Oh!, i made stupid mistakes!

dude is it like this?
JASS:
set u = CreateUnit( Player(0), 'hfoo', 0, 0, 270.)
because when i try the jass you have given syntax keeps on bothering me..

and btw, what is the difference between
JASS:
private function a takes nothing returns nothing
from
JASS:
function a takes nothing returns nothing
??
 
Oh!, i made stupid mistakes!

dude is it like this?
JASS:
set u = CreateUnit( Player(0), 'hfoo', 0, 0, 270.)
because when i try the jass you have given syntax keeps on bothering me..

and btw, what is the difference between
JASS:
private function a takes nothing returns nothing
from
JASS:
function a takes nothing returns nothing
??

They already answered your question about privates, but in answer to the part about whitespace, it absolutely doesn't matter. JASS is the same if it's:

JASS:
set u=CreateUnit(Player(0),'hfoo',0,0,270.)

JASS:
set u = CreateUnit( Player(0), 'hfoo', 0, 0, 270.)

JASS:
set u       =      CreateUnit(  Player(0),   'hfoo',  0,  0,                      270.)
 
Status
Not open for further replies.
Top