- Joined
- Apr 23, 2011
- Messages
- 460
I was wondering what is wrong with the script. I used Jasscraft to write it, and it parsed successfully, but WE won't let it go, it says that it expected a name in the first function and several other errors. Any Ideas?
edit: fixed indenting for script to be "prettier".
JASS:
function GetPlayerCount takes nothing returns integer
local integer count = CountPlayersInForceBJ(udg_Players_Group)
return count
endfunction
function IsOnePlayer takes nothing returns boolean
if ( not ( GetPlayerCount() == 1 ) ) then
return false
endif
return true
endfunction
function PlayerIsOne takes nothing returns nothing
local player p
if IsOnePlayer() then
set p = ForcePickRandomPlayer(udg_Players_Group)
call CustomDefeatBJ(p,"One player not allowed")
endif
set p = null
endfunction
function InitTrig_One_Player_Game takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerAddAction(t,function PlayerIsOne)
call TriggerRegisterTimerEventPeriodic(t,1)
set t = null
endfunction
edit: fixed indenting for script to be "prettier".
Last edited: