HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to store a string array in a game cache

12-24-2003, 01:12 AM#1
l]arkOne
I dont know why my second map cant load correctly the strings.

It was working before I store the variable in the cache. You would tell me to simply copy/paste all MapPath setup but I will have a lot of map later and I dont want to reopen each map to add a new line. This prevent spelling error too. Basicaly, I want this variable manualy set only once and in only one map. I dont need to modify(save a second time in the cache) the variable.

I dont really know how to store an array in the cache so I was trying this way. Please post what I should write using a For Each.


--In my first map--
MapCount=2
MapPath[1]=Maps\HeroRPG\Darhall.w3x
MapPath[2]=Maps\HeroRPG\Darhall_Building.w3x

Store MapCount as MapCount...
For each IntegerA from 1 to MapCount:
GameCache - Store MapPath[IntegerA] as ("MapPath"+(String(IntegerA))) of HeroRPG in Last created game cache.

Set Next Level to MapPath[Destination]
Victory


--In my second map--
Set MapCount = Load MapCount...
For each IntegerA from 1 to MapCount:
Set MapPath = Load ("MapPath"+(String(IntegerA))) of HeroRPG in Last created game cache.

Note: "MapPath" isnt a variable in the label spot. I didnt write all the cache trigger like save/create...
How to store a string array in a game cache - Wc3C.net