Alright. I recently started using NewGen, wrote this trigger and got two errors:
The function InWhichRegion is the Custom Script Code section, and it has no errors in itself.
JASS:
function Trig_Flytta_Torn_Conditions takes nothing returns boolean
return ( GetUnitTypeId(GetOrderedUnit()) == 039;emtg039; )
endfunction
function Trig_Flytta_Torn_Actions takes nothing returns nothing
local rect r
local location l = GetOrderPointLoc()
set r = InWhichRegion(l) ERROR: Undeclared function InWhichRegion
call IssuePointOrderLoc(GetOrderedUnit(), "move", GetRectCenter(r))
endfunction
//===========================================================================
function InitTrig_Flytta_Torn takes nothing returns nothing
set gg_trg_Flytta_Torn = CreateTrigger( ) ERROR: Undeclared variable gg_trg_Flytta_Torn
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flytta_Torn, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Flytta_Torn, Condition( function Trig_Flytta_Torn_Conditions ) )
call TriggerAddAction( gg_trg_Flytta_Torn, function Trig_Flytta_Torn_Actions )
endfunction
The function InWhichRegion is the Custom Script Code section, and it has no errors in itself.