Xipxop
Круче варика, только c++!
offline
Опыт:
7,646
Активность:
|
Ошибка препроцессора cJass (local all cjlocgn_00000000)
У меня появилась вдруг такая ошибка local all cjlocgn_00000000
Эта локальная переменная возникла из ниоткуда.
Юзал поиск, там была такая уже ошибка, но она не была решена.
Примерные действия которые повлекли за собой ошибку:
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Музыка: Нету :(")
вместо обычной BJ функции (5 штук таких в одном триггере изменил на локалпл())
и создание скила:
» раскрыть
Код:
function Trig_StopTheTime_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00A'
endfunction
function Trig_StopTheTime_Moroz takes nothing returns nothing
local unit un=GetEnumUnit()
if GetUnitTypeId(un)!='h00M' and GetUnitTypeId(un)!='h01S' then
call SetUnitTimeScale(un, 0.0)
call PauseUnit( un, true )
endif
set un=null
endfunction
function Trig_StopTheTime_Live takes nothing returns nothing
local unit un=GetEnumUnit()
call SetUnitTimeScale(un, 1.0)
call PauseUnit( un, false )
set un=null
endfunction
function Trig_StopTheTime_Timer takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)
local unit dummy=LoadUnitHandle(HASH, h, 1)
local player pl=LoadPlayerHandle(HASH, h, 2)
local group g=LoadGroupHandle(HASH, h, 3)
if GetUnitState(dummy, UNIT_STATE_LIFE) <= 0 then
call SetUnitTimeScale(dummy, 1.0)
call DestroyTimer(t)
call ForGroup(g, function Trig_StopTheTime_Live)
call DestroyGroup(g)
else
call GroupEnumUnitsInRangeOfLoc(g, GetUnitLoc(dummy), 250, null)
call SaveGroupHandle(HASH, h, 3, g)
call ForGroup(g, function Trig_StopTheTime_Moroz)
endif
set t=null
set dummy=null
set pl=null
endfunction
function Trig_StopTheTime_Actions takes nothing returns nothing
local unit caster=GetSpellAbilityUnit()
local player pl=GetOwningPlayer(caster)
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit dummy=CreateUnit(pl, 'h01S', x, y, 270.)
local timer t=CreateTimer()
local integer h=GetHandleId(t)
local group g=CreateGroup()
call SetUnitTimeScale(dummy, 0.0)
call GroupEnumUnitsInRangeOfLoc(g, GetUnitLoc(dummy), 250, null)
call SaveUnitHandle(HASH, h, 1, dummy)
call SavePlayerHandle(HASH, h, 2, pl)
call SaveGroupHandle(HASH, h, 3, g)
call UnitApplyTimedLife(dummy, 'BTLF', 15.0)
call TimerStart(t,0.10,true,function Trig_StopTheTime_Timer)
set caster=null
set pl=null
set dummy=null
set t=null
endfunction
//===========================================================================
function InitTrig_StopTheTime takes nothing returns nothing
set gg_trg_StopTheTime = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StopTheTime, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_StopTheTime, Condition( function Trig_StopTheTime_Conditions ) )
call TriggerAddAction( gg_trg_StopTheTime, function Trig_StopTheTime_Actions )
endfunction
Вот сам триггер где появляется ошибка:
» раскрыть
Код:
function Trig_ShooseLapsJass_Conditions takes nothing returns boolean
return IsUnitSelected(gg_unit_Naka_0011, Player(0)) or IsUnitSelected(gg_unit_Naka_0013, Player(0)) or IsUnitSelected(gg_unit_Naka_0014, Player(0)) or IsUnitSelected(gg_unit_Naka_0015, Player(0))
endfunction
function Trig_ShooseLapsJass_Actions takes nothing returns nothing
local unit un=GetTriggerUnit()
call DisableTrigger( gg_trg_ShooseLapsJass )
if un==gg_unit_Naka_0011 then
if udg_stage==1 then
set udg_MaxLaps = 20
else
if udg_stage==2 then
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Музыка: Нету :(")
else
//Глаз ДА 1 магия
endif
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\TrollBerserk\\TrollBeserkerTarget.mdl",-2256.,496.))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",-2256.,496.))
call DestroyEffect(AddSpecialEffect("Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl",-2256.,496.))
else
if un==gg_unit_Naka_0013 then
if udg_stage==1 then
set udg_MaxLaps = 15
else
if udg_stage==2 then
call PlayMusic( gg_snd_Music3 )
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Музыка: Warcraft 2")
else
//Глаз ДА ВСЕ магия
endif
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\TrollBerserk\\TrollBeserkerTarget.mdl",-2015.,514.))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",-2015.,514.))
call DestroyEffect(AddSpecialEffect("Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl",-2015.,514.))
else
if un==gg_unit_Naka_0014 then
if udg_stage==1 then
set udg_MaxLaps = 10
else
if udg_stage==2 then
call PlayMusic( gg_snd_Music2 )
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Музыка: Credit")
else
//Глаз ДА 1 магия
endif
endif
call SetUnitAnimation( gg_unit_Naka_0014, "attack" )
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\TrollBerserk\\TrollBeserkerTarget.mdl",-1805.,525.))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",-1805.,525.))
call DestroyEffect(AddSpecialEffect("Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl",-1805.,525.))
else
if udg_stage==1 then
set udg_MaxLaps = 5
else
if udg_stage==2 then
call PlayMusic( gg_snd_Music4 )
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Музыка: Storm and Fire")
else
//Глаз ДА 1 магия
endif
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\TrollBerserk\\TrollBeserkerTarget.mdl",-1709.,425.))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",-1709.,425.))
call DestroyEffect(AddSpecialEffect("Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl",-1709.,425.))
endif
endif
endif
udg_stage=udg_stage+1
if udg_stage==2 then
all DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Кол-во кругов: "+I2S(udg_MaxLaps))
call SetTextTagText( udg_TextTag[1], "Нету :(", 0.023 )
call SetTextTagText( udg_TextTag[2], "Warcraft 2", 0.023 )
call SetTextTagText( udg_TextTag[3], "Credit", 0.023 )
call SetTextTagText( udg_TextTag[4], "Storm\nAnd\nFire", 0.023 )
else
if udg_stage==3 then
call SetTextTagText( udg_TextTag[1], "Глаз \nДА \n1 магия", 0.023 )
call SetTextTagText( udg_TextTag[2], "Глаз \nДА \nВСЕ магии", 0.023 )
call SetTextTagText( udg_TextTag[3], "Глаз \nНЕТ", 0.023 )
call SetTextTagText( udg_TextTag[4], "", 0.023 )
call KillUnit(gg_unit_Naka_0015)
else
if udg_stage==4 then
call KillUnit(gg_unit_Naka_0011)
call KillUnit(gg_unit_Naka_0013)
call KillUnit(gg_unit_Naka_0014)
call DestroyTextTag(udg_TextTag[1])
call DestroyTextTag(udg_TextTag[2])
call DestroyTextTag(udg_TextTag[3])
call DestroyTextTag(udg_TextTag[4])
call TriggerExecute( gg_trg_Table )
call TriggerExecute( gg_trg_StartGame )
call DisableTrigger( gg_trg_ShooseLapsJass )
else
endif
endif
endif
call ClearSelection()
call SetUnitAnimation( un, "attack" )
call EnableTrigger( gg_trg_ShooseLapsJass )
set un=null
endfunction
//===========================================================================
function InitTrig_ShooseLapsJass takes nothing returns nothing
set gg_trg_ShooseLapsJass = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShooseLapsJass, gg_unit_Naka_0011, EVENT_UNIT_SELECTED )
call TriggerRegisterUnitEvent( gg_trg_ShooseLapsJass, gg_unit_Naka_0013, EVENT_UNIT_SELECTED )
call TriggerRegisterUnitEvent( gg_trg_ShooseLapsJass, gg_unit_Naka_0014, EVENT_UNIT_SELECTED )
call TriggerRegisterUnitEvent( gg_trg_ShooseLapsJass, gg_unit_Naka_0015, EVENT_UNIT_SELECTED )
call TriggerAddCondition( gg_trg_ShooseLapsJass, Condition( function Trig_ShooseLapsJass_Conditions ) )
call TriggerAddAction( gg_trg_ShooseLapsJass, function Trig_ShooseLapsJass_Actions )
endfunction
JNGP exp2, последняя версия cJass и всех ост компонентов входящих в JNGP exp2.
P.S. Карта после этого критом вылетает
P.P.S. Отключение этих триггеров не повлекло ни к чему
Xipxop добавил:
Правда ошибка исчезает если выключить """Глюченый триггер"""
Xipxop добавил:
отключение этой части из глюченого триггера убирает баг
» раскрыть
Код:
udg_stage=udg_stage+1
if udg_stage==2 then
all DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 10., "Кол-во кругов: "+I2S(udg_MaxLaps))
call SetTextTagText( udg_TextTag[1], "Нету :(", 0.023 )
call SetTextTagText( udg_TextTag[2], "Warcraft 2", 0.023 )
call SetTextTagText( udg_TextTag[3], "Credit", 0.023 )
call SetTextTagText( udg_TextTag[4], "Storm\nAnd\nFire", 0.023 )
else
if udg_stage==3 then
call SetTextTagText( udg_TextTag[1], "Глаз \nДА \n1 магия", 0.023 )
call SetTextTagText( udg_TextTag[2], "Глаз \nДА \nВСЕ магии", 0.023 )
call SetTextTagText( udg_TextTag[3], "Глаз \nНЕТ", 0.023 )
call SetTextTagText( udg_TextTag[4], "", 0.023 )
call KillUnit(gg_unit_Naka_0015)
else
if udg_stage==4 then
call KillUnit(gg_unit_Naka_0011)
call KillUnit(gg_unit_Naka_0013)
call KillUnit(gg_unit_Naka_0014)
call DestroyTextTag(udg_TextTag[1])
call DestroyTextTag(udg_TextTag[2])
call DestroyTextTag(udg_TextTag[3])
call DestroyTextTag(udg_TextTag[4])
call TriggerExecute( gg_trg_Table )
call TriggerExecute( gg_trg_StartGame )
call DisableTrigger( gg_trg_ShooseLapsJass )
else
endif
endif
endif
|