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

[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