- Joined
- Apr 16, 2012
- Messages
- 4
My Save and Load are disabled and I don't know what's wrong...
Here's Save Category :
Problems :
Then Load Category :
Problems :
If someone can help me...
Here's Save Category :
HTML:
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
player udg_Instagator = null
timerdialog udg_Timer = null
timer udg_Survie = null
string udg_Code
force udg_Players = null
integer array udg_Save
integer udg_SaveCount = 0
integer array udg_SaveLoad_Abilities
integer udg_SaveLoad_Abilities_LastIndex = 0
string udg_SaveLoad_Alphabet
boolean udg_SaveLoad_CaseSensitive = false
integer array udg_SaveLoad_Compress
integer array udg_SaveLoad_Heroes
integer udg_SaveLoad_Heroes_LastIndex = 0
boolean udg_SaveLoad_Initialized = false
integer array udg_SaveLoad_Items
integer udg_SaveLoad_Items_LastIndex = 0
integer array udg_SaveLoad_Uncompress
boolean udg_SaveLoad_UsePlayername = false
integer array udg_SaveLoadAbilitiesStored
integer udg_SaveLoadBlockSize = 0
string array udg_SaveLoadCharacterNumbers
string udg_SaveLoadCharacterSet
string array udg_SaveLoadEncryptionSet
boolean array udg_SaveLoadHasLoaded
integer array udg_SaveLoadHeroesStored
integer array udg_SaveLoadItemsStored
integer udg_SaveLoadMaxAbilitiesStored = 0
integer udg_SaveLoadMaxCharacters = 0
integer udg_SaveLoadMaxEncryptionSets = 0
integer udg_SaveLoadMaxHeroesStored = 0
integer udg_SaveLoadMaxItemsStored = 0
unit array udg_SaveLoadPlayerHeroSingle
integer udg_SaveLoadSlotsAbilities = 0
integer udg_SaveLoadSlotsGold = 0
integer udg_SaveLoadSlotsHero = 0
integer udg_SaveLoadSlotsHeroLevel = 0
integer udg_SaveLoadSlotsItem = 0
integer udg_SaveLoadSlotsLumber = 0
integer udg_SaveLoadSlotsStats = 0
integer array udg_SaveLoadVariablesStored
item udg_TempItem = null
integer udg_TempItemType = 0
unit udg_TempUnit = null
integer udg_TempUnitType = 0
group udg_UnitGroup = null
boolean udg_Validate = false
group udg_duelpeople = null
// Generated
rect gg_rct_Attaque_zombie = null
rect gg_rct_Vague_2 = null
rect gg_rct_Vague_3 = null
rect gg_rct_Attaque_zombie_2 = null
rect gg_rct_Ouest = null
rect gg_rct_Est = null
rect gg_rct_Renfort = null
rect gg_rct_Maison_1 = null
rect gg_rct_Maison_2 = null
rect gg_rct_Entree_maison_1 = null
rect gg_rct_Sortie_maison_1 = null
rect gg_rct_Entree_maison_2 = null
rect gg_rct_Sortie_maison_2 = null
rect gg_rct_quitter_2 = null
rect gg_rct_quitter_1 = null
rect gg_rct_vague_forte = null
rect gg_rct_boss = null
rect gg_rct_Vague_mutant = null
rect gg_rct_Vague_mutant_2 = null
rect gg_rct_Game_creator = null
rect gg_rct_Merci = null
rect gg_rct_renfort_1 = null
rect gg_rct_renfort_2 = null
rect gg_rct_renfort_3 = null
rect gg_rct_renfort_4 = null
rect gg_rct_renfort_5 = null
rect gg_rct_Spawn_maison_est = null
rect gg_rct_Spawn_maison_ouest = null
rect gg_rct_CodeItems = null
rect gg_rct_Load_Heroes = null
camerasetup gg_cam_Camera_001 = null
string gg_snd_Tension
string gg_snd_Drowning_Pool___01___Bodies
trigger gg_trg_SaveLoadPreInizialization_Copy = null
trigger gg_trg_SaveLoadRealInizialization_Copy = null
trigger gg_trg_Save_Copy = null
trigger gg_trg_Load_Copy = null
trigger gg_trg_Activer = null
trigger gg_trg_Activer_Copier = null
trigger gg_trg_boss = null
trigger gg_trg_boss_Copier = null
trigger gg_trg_vague_forte_arrive = null
trigger gg_trg_vague_2_arrive = null
trigger gg_trg_vague_3_arrive = null
trigger gg_trg_Debut = null
trigger gg_trg_Objet_apparition = null
trigger gg_trg_tourelle = null
trigger gg_trg_Vague_zombie_sans_arret = null
trigger gg_trg_Renfort = null
trigger gg_trg_Avant_poste_detruit = null
trigger gg_trg_bois = null
trigger gg_trg_lal = null
trigger gg_trg_texte_flottant = null
trigger gg_trg_meurt = null
trigger gg_trg_meurt_Copier = null
trigger gg_trg_meurt_Copier_2 = null
trigger gg_trg_meurt_Copier_3 = null
trigger gg_trg_meurt_Copier_4 = null
trigger gg_trg_meurt_Copier_5 = null
trigger gg_trg_meurt_Copier_6 = null
trigger gg_trg_meurt_Copier_7 = null
trigger gg_trg_meurt_Copier_8 = null
trigger gg_trg_meurt_Copier_9 = null
trigger gg_trg_chargeur_1 = null
trigger gg_trg_attaque = null
trigger gg_trg_Quete_1 = null
trigger gg_trg_Quete_3 = null
trigger gg_trg_Quete_3_Copier = null
trigger gg_trg_mourir = null
trigger gg_trg_maison_1 = null
trigger gg_trg_maison_2 = null
trigger gg_trg_quitter_1 = null
trigger gg_trg_quitter_2 = null
trigger gg_trg_ally = null
trigger gg_trg_Declare_War_1 = null
trigger gg_trg_Declare_War_1_Copier = null
trigger gg_trg_Declare_War_1_Copier_2 = null
trigger gg_trg_Declare_War_1_Copier_3 = null
trigger gg_trg_Declare_War_1_Copier_4 = null
trigger gg_trg_Declare_War_1_Copier_5 = null
trigger gg_trg_Declare_War_1_Copier_6 = null
trigger gg_trg_Declare_War_1_Copier_7 = null
trigger gg_trg_Declare_War_1_Copier_8 = null
trigger gg_trg_Declare_War_1_Copier_9 = null
trigger gg_trg_Remove_Left_Players = null
trigger gg_trg_Turn_On = null
trigger gg_trg_Turn_Off = null
trigger gg_trg_Survivants_gagnants = null
trigger gg_trg_gagnes = null
trigger gg_trg_code = null
unit gg_unit_h000_0184 = null
unit gg_unit_H002_0021 = null
unit gg_unit_H002_0020 = null
unit gg_unit_H002_0019 = null
unit gg_unit_H002_0018 = null
unit gg_unit_H002_0012 = null
unit gg_unit_H002_0013 = null
unit gg_unit_H002_0014 = null
unit gg_unit_H002_0015 = null
unit gg_unit_H002_0016 = null
unit gg_unit_H002_0017 = null
unit gg_unit_Eevi_0042 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_Survie = CreateTimer()
set udg_Code = ""
set udg_Players = CreateForce()
set i = 0
loop
exitwhen (i > 1)
set udg_Save[i] = 0
set i = i + 1
endloop
set udg_SaveCount = 0
set udg_SaveLoad_Abilities_LastIndex = 0
set udg_SaveLoad_Alphabet = ""
set udg_SaveLoad_CaseSensitive = false
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoad_Compress[i] = 0
set i = i + 1
endloop
set udg_SaveLoad_Heroes_LastIndex = 0
set udg_SaveLoad_Initialized = false
set udg_SaveLoad_Items_LastIndex = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoad_Uncompress[i] = 0
set i = i + 1
endloop
set udg_SaveLoad_UsePlayername = false
set udg_SaveLoadBlockSize = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadCharacterNumbers[i] = ""
set i = i + 1
endloop
set udg_SaveLoadCharacterSet = ""
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadEncryptionSet[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadHasLoaded[i] = false
set i = i + 1
endloop
set udg_SaveLoadMaxAbilitiesStored = 0
set udg_SaveLoadMaxCharacters = 0
set udg_SaveLoadMaxEncryptionSets = 0
set udg_SaveLoadMaxHeroesStored = 0
set udg_SaveLoadMaxItemsStored = 0
set udg_SaveLoadSlotsAbilities = 0
set udg_SaveLoadSlotsGold = 0
set udg_SaveLoadSlotsHero = 0
set udg_SaveLoadSlotsHeroLevel = 0
set udg_SaveLoadSlotsItem = 0
set udg_SaveLoadSlotsLumber = 0
set udg_SaveLoadSlotsStats = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadVariablesStored[i] = 0
set i = i + 1
endloop
set udg_UnitGroup = CreateGroup()
set udg_Validate = false
set udg_duelpeople = CreateGroup()
endfunction
function Trig_Save_Copy_Func004002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Save_Copy_Func007Func012Func001C takes nothing returns boolean
if ( not ( IsItemOwned(UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Save_Copy_Func007A takes nothing returns nothing
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_TempUnit = GetEnumUnit()
set udg_Save[udg_SaveCount] = SaveLoad_Unit2Integer(udg_TempUnit)
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = GetHeroXP(GetEnumUnit())
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = R2I(GetLocationX(GetUnitLoc(GetEnumUnit())))
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = R2I(GetLocationY(GetUnitLoc(GetEnumUnit())))
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = UnitInventoryCount(GetEnumUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Save_Copy_Func007Func012Func001C() ) then
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_TempItem = UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA())
set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = GetItemCharges(UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA()))
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER)
endfunction
function Trig_Save_Copy_Actions takes nothing returns nothing
set udg_SaveCount = 0
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD)
set udg_UnitGroup = GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Save_Copy_Func004002002))
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_Save[udg_SaveCount] = CountUnitsInGroup(udg_UnitGroup)
call ForGroupBJ( udg_UnitGroup, function Trig_Save_Copy_Func007A )
set udg_Code = SaveLoad_Encode()
call QuestMessageBJ( GetForceOfPlayer(GetTriggerPlayer()), bj_QUESTMESSAGE_SECRET, "TRIGSTR_250" )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 300.00, udg_Code )
call QuestMessageBJ( GetForceOfPlayer(GetTriggerPlayer()), bj_QUESTMESSAGE_SECRET, "TRIGSTR_251" )
endfunction
//===========================================================================
function InitTrig_Save_Copy takes nothing returns nothing
set gg_trg_Save_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(0), "-save", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(1), "-save", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(2), "-save", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(3), "-save", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(4), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(5), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(6), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(7), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(8), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(9), "-save", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Copy, Player(10), "-save", false )
call TriggerAddAction( gg_trg_Save_Copy, function Trig_Save_Copy_Actions )
endfunction
Problems :
HTML:
set udg_Save[udg_SaveCount] = SaveLoad_Unit2Integer(udg_TempUnit)
HTML:
set udg_Save[udg_SaveCount] = SaveLoad_Item2Integer( udg_TempItem )
HTML:
set udg_Code = SaveLoad_Encode()
Then Load Category :
HTML:
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
player udg_Instagator = null
timerdialog udg_Timer = null
timer udg_Survie = null
string udg_Code
force udg_Players = null
integer array udg_Save
integer udg_SaveCount = 0
integer array udg_SaveLoad_Abilities
integer udg_SaveLoad_Abilities_LastIndex = 0
string udg_SaveLoad_Alphabet
boolean udg_SaveLoad_CaseSensitive = false
integer array udg_SaveLoad_Compress
integer array udg_SaveLoad_Heroes
integer udg_SaveLoad_Heroes_LastIndex = 0
boolean udg_SaveLoad_Initialized = false
integer array udg_SaveLoad_Items
integer udg_SaveLoad_Items_LastIndex = 0
integer array udg_SaveLoad_Uncompress
boolean udg_SaveLoad_UsePlayername = false
integer array udg_SaveLoadAbilitiesStored
integer udg_SaveLoadBlockSize = 0
string array udg_SaveLoadCharacterNumbers
string udg_SaveLoadCharacterSet
string array udg_SaveLoadEncryptionSet
boolean array udg_SaveLoadHasLoaded
integer array udg_SaveLoadHeroesStored
integer array udg_SaveLoadItemsStored
integer udg_SaveLoadMaxAbilitiesStored = 0
integer udg_SaveLoadMaxCharacters = 0
integer udg_SaveLoadMaxEncryptionSets = 0
integer udg_SaveLoadMaxHeroesStored = 0
integer udg_SaveLoadMaxItemsStored = 0
unit array udg_SaveLoadPlayerHeroSingle
integer udg_SaveLoadSlotsAbilities = 0
integer udg_SaveLoadSlotsGold = 0
integer udg_SaveLoadSlotsHero = 0
integer udg_SaveLoadSlotsHeroLevel = 0
integer udg_SaveLoadSlotsItem = 0
integer udg_SaveLoadSlotsLumber = 0
integer udg_SaveLoadSlotsStats = 0
integer array udg_SaveLoadVariablesStored
item udg_TempItem = null
integer udg_TempItemType = 0
unit udg_TempUnit = null
integer udg_TempUnitType = 0
group udg_UnitGroup = null
boolean udg_Validate = false
group udg_duelpeople = null
// Generated
rect gg_rct_Attaque_zombie = null
rect gg_rct_Vague_2 = null
rect gg_rct_Vague_3 = null
rect gg_rct_Attaque_zombie_2 = null
rect gg_rct_Ouest = null
rect gg_rct_Est = null
rect gg_rct_Renfort = null
rect gg_rct_Maison_1 = null
rect gg_rct_Maison_2 = null
rect gg_rct_Entree_maison_1 = null
rect gg_rct_Sortie_maison_1 = null
rect gg_rct_Entree_maison_2 = null
rect gg_rct_Sortie_maison_2 = null
rect gg_rct_quitter_2 = null
rect gg_rct_quitter_1 = null
rect gg_rct_vague_forte = null
rect gg_rct_boss = null
rect gg_rct_Vague_mutant = null
rect gg_rct_Vague_mutant_2 = null
rect gg_rct_Game_creator = null
rect gg_rct_Merci = null
rect gg_rct_renfort_1 = null
rect gg_rct_renfort_2 = null
rect gg_rct_renfort_3 = null
rect gg_rct_renfort_4 = null
rect gg_rct_renfort_5 = null
rect gg_rct_Spawn_maison_est = null
rect gg_rct_Spawn_maison_ouest = null
rect gg_rct_CodeItems = null
rect gg_rct_Load_Heroes = null
camerasetup gg_cam_Camera_001 = null
string gg_snd_Tension
string gg_snd_Drowning_Pool___01___Bodies
trigger gg_trg_SaveLoadPreInizialization_Copy = null
trigger gg_trg_SaveLoadRealInizialization_Copy = null
trigger gg_trg_Save_Copy = null
trigger gg_trg_Load_Copy = null
trigger gg_trg_Activer = null
trigger gg_trg_Activer_Copier = null
trigger gg_trg_boss = null
trigger gg_trg_boss_Copier = null
trigger gg_trg_vague_forte_arrive = null
trigger gg_trg_vague_2_arrive = null
trigger gg_trg_vague_3_arrive = null
trigger gg_trg_Debut = null
trigger gg_trg_Objet_apparition = null
trigger gg_trg_tourelle = null
trigger gg_trg_Vague_zombie_sans_arret = null
trigger gg_trg_Renfort = null
trigger gg_trg_Avant_poste_detruit = null
trigger gg_trg_bois = null
trigger gg_trg_lal = null
trigger gg_trg_texte_flottant = null
trigger gg_trg_meurt = null
trigger gg_trg_meurt_Copier = null
trigger gg_trg_meurt_Copier_2 = null
trigger gg_trg_meurt_Copier_3 = null
trigger gg_trg_meurt_Copier_4 = null
trigger gg_trg_meurt_Copier_5 = null
trigger gg_trg_meurt_Copier_6 = null
trigger gg_trg_meurt_Copier_7 = null
trigger gg_trg_meurt_Copier_8 = null
trigger gg_trg_meurt_Copier_9 = null
trigger gg_trg_chargeur_1 = null
trigger gg_trg_attaque = null
trigger gg_trg_Quete_1 = null
trigger gg_trg_Quete_3 = null
trigger gg_trg_Quete_3_Copier = null
trigger gg_trg_mourir = null
trigger gg_trg_maison_1 = null
trigger gg_trg_maison_2 = null
trigger gg_trg_quitter_1 = null
trigger gg_trg_quitter_2 = null
trigger gg_trg_ally = null
trigger gg_trg_Declare_War_1 = null
trigger gg_trg_Declare_War_1_Copier = null
trigger gg_trg_Declare_War_1_Copier_2 = null
trigger gg_trg_Declare_War_1_Copier_3 = null
trigger gg_trg_Declare_War_1_Copier_4 = null
trigger gg_trg_Declare_War_1_Copier_5 = null
trigger gg_trg_Declare_War_1_Copier_6 = null
trigger gg_trg_Declare_War_1_Copier_7 = null
trigger gg_trg_Declare_War_1_Copier_8 = null
trigger gg_trg_Declare_War_1_Copier_9 = null
trigger gg_trg_Remove_Left_Players = null
trigger gg_trg_Turn_On = null
trigger gg_trg_Turn_Off = null
trigger gg_trg_Survivants_gagnants = null
trigger gg_trg_gagnes = null
trigger gg_trg_code = null
unit gg_unit_h000_0184 = null
unit gg_unit_H002_0021 = null
unit gg_unit_H002_0020 = null
unit gg_unit_H002_0019 = null
unit gg_unit_H002_0018 = null
unit gg_unit_H002_0012 = null
unit gg_unit_H002_0013 = null
unit gg_unit_H002_0014 = null
unit gg_unit_H002_0015 = null
unit gg_unit_H002_0016 = null
unit gg_unit_H002_0017 = null
unit gg_unit_Eevi_0042 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_Survie = CreateTimer()
set udg_Code = ""
set udg_Players = CreateForce()
set i = 0
loop
exitwhen (i > 1)
set udg_Save[i] = 0
set i = i + 1
endloop
set udg_SaveCount = 0
set udg_SaveLoad_Abilities_LastIndex = 0
set udg_SaveLoad_Alphabet = ""
set udg_SaveLoad_CaseSensitive = false
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoad_Compress[i] = 0
set i = i + 1
endloop
set udg_SaveLoad_Heroes_LastIndex = 0
set udg_SaveLoad_Initialized = false
set udg_SaveLoad_Items_LastIndex = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoad_Uncompress[i] = 0
set i = i + 1
endloop
set udg_SaveLoad_UsePlayername = false
set udg_SaveLoadBlockSize = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadCharacterNumbers[i] = ""
set i = i + 1
endloop
set udg_SaveLoadCharacterSet = ""
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadEncryptionSet[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadHasLoaded[i] = false
set i = i + 1
endloop
set udg_SaveLoadMaxAbilitiesStored = 0
set udg_SaveLoadMaxCharacters = 0
set udg_SaveLoadMaxEncryptionSets = 0
set udg_SaveLoadMaxHeroesStored = 0
set udg_SaveLoadMaxItemsStored = 0
set udg_SaveLoadSlotsAbilities = 0
set udg_SaveLoadSlotsGold = 0
set udg_SaveLoadSlotsHero = 0
set udg_SaveLoadSlotsHeroLevel = 0
set udg_SaveLoadSlotsItem = 0
set udg_SaveLoadSlotsLumber = 0
set udg_SaveLoadSlotsStats = 0
set i = 0
loop
exitwhen (i > 1)
set udg_SaveLoadVariablesStored[i] = 0
set i = i + 1
endloop
set udg_UnitGroup = CreateGroup()
set udg_Validate = false
set udg_duelpeople = CreateGroup()
endfunction
function Trig_Load_Copy_Conditions takes nothing returns boolean
if ( not ( udg_SaveLoadHasLoaded[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 6) == GetEventPlayerChatStringMatched() ) ) then
return false
endif
if ( not ( StringLength(GetEventPlayerChatString()) > 6 ) ) then
return false
endif
return true
endfunction
function Trig_Load_Copy_Func004C takes nothing returns boolean
if ( not ( udg_Validate == false ) ) then
return false
endif
return true
endfunction
function Trig_Load_Copy_Func005A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Load_Copy_Actions takes nothing returns nothing
set udg_Code = SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))
set udg_Validate = SaveLoad_Decode( udg_Code )
if ( Trig_Load_Copy_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_252" )
return
else
endif
call ForGroupBJ( GetUnitsOfPlayerAll(GetTriggerPlayer()), function Trig_Load_Copy_Func005A )
set udg_SaveLoadHasLoaded[GetConvertedPlayerId(GetTriggerPlayer())] = true
set udg_SaveCount = 1
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, udg_Save[udg_SaveCount] )
set udg_SaveCount = ( udg_SaveCount + 1 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = udg_Save[udg_SaveCount]
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_TempUnitType = SaveLoad_Integer2Unit(udg_Save[udg_SaveCount])
call CreateNUnitsAtLoc( 1, udg_TempUnitType, GetTriggerPlayer(), GetPlayerStartLocationLoc(GetTriggerPlayer()), bj_UNIT_FACING )
set udg_SaveLoadPlayerHeroSingle[GetConvertedPlayerId(GetTriggerPlayer())] = GetLastCreatedUnit()
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_duelpeople )
call ForceAddPlayerSimple( GetOwningPlayer(GetTriggerUnit()), udg_Players )
call UnitAddAbilityBJ( udg_SaveLoadAbilitiesStored[udg_Save[udg_SaveCount]], GetLastCreatedUnit() )
set udg_SaveCount = ( udg_SaveCount + 1 )
call SetHeroXP( GetLastCreatedUnit(), udg_Save[udg_SaveCount], false )
set udg_SaveCount = ( udg_SaveCount + 1 )
call SetUnitPositionLoc( GetLastCreatedUnit(), GetRectCenter(gg_rct_Load_Heroes) )
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_SaveCount = ( udg_SaveCount + 1 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Save[udg_SaveCount]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_SaveCount = ( udg_SaveCount + 1 )
set udg_TempItemType = SaveLoad_Integer2Item(udg_Save[udg_SaveCount])
call UnitAddItemByIdSwapped( udg_TempItemType, GetLastCreatedUnit() )
set udg_SaveCount = ( udg_SaveCount + 1 )
call SetItemCharges( GetLastCreatedItem(), udg_Save[udg_SaveCount] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_SaveCount = ( udg_SaveCount + 1 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Load_Copy takes nothing returns nothing
set gg_trg_Load_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(0), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(1), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(2), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(3), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(4), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(5), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(6), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(7), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(8), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(9), "-load ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Copy, Player(10), "-load ", false )
call TriggerAddCondition( gg_trg_Load_Copy, Condition( function Trig_Load_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Load_Copy, function Trig_Load_Copy_Actions )
endfunction
Problems :
HTML:
set udg_Validate = SaveLoad_Decode( udg_Code )
HTML:
set udg_TempUnitType = SaveLoad_Integer2Unit(udg_Save[udg_SaveCount])
HTML:
set udg_TempItemType = SaveLoad_Integer2Item(udg_Save[udg_SaveCount])
If someone can help me...