HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Cache Problems

04-12-2006, 07:48 PM#1
Captain Griffen
Trigger:
Save
Collapse Events
Dialog - A dialog button is clicked for SaveDialog
Conditions
Collapse Actions
Game Cache - Create a game cache from RoDDoD.w3v
Set SaveCache = (Last created game cache)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to SaveDialogYes
Collapse Then - Actions
Game Cache - Store False as Transfer of (TempString + General) in (Last created game cache)
Set TempString = (S + TempString)
Collapse Else - Actions
Game Cache - Store True as Transfer of (TempString + General) in (Last created game cache)
Set TempString = (T + TempString)
Set TempInt = 0
Collapse For each (Integer A) from 1 to PartyMembersNo, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(PartyMembers[(Integer A)] is A Hero) Equal to True
Collapse Then - Actions
Set TempInt = (TempInt + 1)
Game Cache - Store PartyMembers[(Integer A)] as (String(TempInt)) of (TempString + Party Members) in SaveCache
Else - Actions
Game Cache - Store TempInt as Numbers of (TempString + Party Members) in SaveCache
Game Cache - Store (Player 1 (Red) Current gold) as Gold of (TempString + General) in SaveCache
Game Cache - Store (Player 1 (Red) Current lumber) as Lumber of (TempString + General) in SaveCache
Game Cache - Save SaveCache

Saves some data to game cache. TempString starts off as 1 (checked), and it runs the loops correctly (checked), with 5 runs of the for each interger and the correct 3 for the hero bit.

Trigger:
Melee Initialization
Collapse Events
Time - Elapsed game time is 0.01 seconds
Conditions
Collapse Actions
Game Cache - Create a game cache from RoDDoD.w3v
Set SaveCache = (Last created game cache)
Set TempString = 1
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Load Transfer of (TempString + General) from SaveCache) Equal to True
Collapse Then - Actions
Set TempString = (T + TempString)
Game Cache - Store False as Transfer of 1General in SaveCache
Collapse Else - Actions
Set TempString = (S + TempString)
Set PartyMembersNo = 0
Collapse For each (Integer A) from 1 to (Load Numbers of (TempString + Party Members) from SaveCache), do (Actions)
Collapse Loop - Actions
Game Cache - Restore (String((Integer A))) of (TempString + Party Members) from SaveCache for Player 2 (Blue) at (Center of (Playable map area)) facing 0.00
Set PartyMembersNo = (PartyMembersNo + 1)
Set PartyMembers[PartyMembersNo] = (Last restored unit)
Player - Set Player 1 (Red) Current gold to (Load Gold of (TempString + General) from SaveCache)
Player - Set Player 1 (Red) Current lumber to (Load Lumber of (TempString + General) from SaveCache)
Game Cache - Save SaveCache

This doesn't load the units. When testing for whether the values exist or not, the values for the gold and lumber exist, but those for the party members do not.

Any idea why they aren't saving (the heroes do exist, and are tested for as heroes)?