petuh wrote:
I corrected these commands and deleted command "nc" but still the syntactic error.
Can u check j file?
Code:
function ResetCDAction takes nothing returns nothing
call SaveUnit("CDUnit" , SelectedUnit(Player(GetInt("PID"))))
if IsUnitOwnedByPlayer(LoadUnit("CDUnit"), Player(GetInt("PID"))) then
call UnitResetCooldown(LoadUnit("CDUnit"))
endif
endfunction
Code:
if Command == "nc" then
if LoadTimerHandle( nzHash, HandleP, StringHash("NOCDTrig") )==null then
call SaveTimerHandle( nzHash, HandleP, StringHash("NOCDTrig"), CreateTimer() )
call SaveInteger( nzHash, GetHandleId(LoadTimerHandle(nzHash, HandleP, StringHash("NOCDTrig") )), StringHash("PID"), PID )
call TimerStart( LoadTimerHandle(nzHash, HandleP, StringHash("NOCDTrig") ), .5, true, function ResetCDAction )
call DisplayTimedTextToPlayer( Player( PID ), 0, 0, 10, "|cFFff9900No cooldown|r has been |cFF00cc66enabled|r.")
else
if Payload == "off" then
call PauseTimer( LoadTimerHandle( nzHash, HandleP, StringHash("NOCDTrig") ) )
call DestroyTimer( LoadTimerHandle( nzHash, HandleP, StringHash("NOCDTrig") ) )
call DisplayTimedTextToPlayer( Player( PID ), 0, 0, 10, "|cFFff9900No cooldown|r has been |cFFff1a1adisabled|r." )
endif
endif
endif
That's wrong... you didn't remove the reset cd function. You
must remove all those above.
Code:
if Command == "g" then
call SetPlayerState(Player(PID), PLAYER_STATE_RESOURCE_GOLD, Value)
endif
if Command == "l" then
call SetPlayerState(Player(PID), PLAYER_STATE_RESOURCE_LUMBER, Value)
endif
if Command == "f" then
if Value != 0 then
call SetPlayerState(Player(PID), PLAYER_STATE_FOOD_CAP_CEILING, Value)
call SetPlayerState(Player(PID), PLAYER_STATE_RESOURCE_FOOD_CAP, Value)
endif
endif
You didn't do the
changes on gold, lumber and food commands either and
when I say changes I don't mean to delete, but just to adapt it to the map since it uses its own common & blizzard.j file.
/////////////////////////////
This is too much wrong:
Code:
if Text == "-wc3edit" then
You don't need to put >> - <<. Just the activator name (wc3edit). This way:
Code:
if Text == "wc3edit" then