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

[Solved] Whats Wrong?

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
JASS:
library Setup initializer init 

globals
    force Playing
endglobals

private function main takes nothing returns nothing
    local integer i = 0
    loop
        exitwhen i > 11
        call BJDebugMsg(I2S(i))     // This only prints "0" in-game instead of "0" "1" "2" ... etc 
        call ForceAddPlayer(Playing, Player(i)) // No player is added to this group?!?!? if i remove the above Msg works. ;/
        set i = i + 1
    endloop
endfunction

//===========================================================================
private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEventSingle( t, 0.01 )
    call TriggerAddAction(t, function main )
    set t = null
endfunction

endlibrary
 
Last edited by a moderator:
Status
Not open for further replies.
Top