Load An Integer Function problem

ludnica

Long gone
Reaction score
61
Ye, really annoying, I know.
I'm using a normal World Editor. I've stored an integer value in a game cache and now I want to load it back. The problem is that either I can't find the function to do so, or my editor simply doesn't have it. I've found this but, uh, it asks for a function "endif" at the end of the trigger:

Trigger:
  • call GetStoredInteger()

So how to load an integer from the cache?
 

Exide

I am amazingly focused right now!
Reaction score
448
I don't have WE or JassCraft with me, so I can't check it, atm.
However, check the link in my signature (at the bottom of my post) for 'How to create your own Campaign'. -It should tell you everything you need.

JASS:


You'll need to at least define a name of the cache and the category from where to load the integer with this function.
I'm also pretty sure that this will do nothing at all. You should assign it to an integer variable:

JASS:

set udg_IntegerVariable = GetStoredInteger(GameCache.w3x, Category, Integer, whatever)


=

Trigger:
  • custom script set udg_IntegerVariable = GetStoredInteger(GameCache.w3x, Category, Integer, whatever)


I'm pretty sure there's a GUI version of it, though. (Should be under 'Game cache'.)
Again, check my Tutorial, link in my signature.
 

ludnica

Long gone
Reaction score
61
Well there ain't a function Load Integer Value on my World Editor. This is ridiculous. I guess I'll try the Jass one.
 

Artificial

Without Intelligence
Reaction score
326
I hope you remember the 'Game Cache - Load Integer Value' can only be seen when editing a field which actually takes an integer value?
Trigger:
  • Example
    • -------- You can't do these alone, as that wouldn't make any sense. --------
    • Hero level of (Triggering unit)
    • Load Label of Category from (Last created game cache)
    • -------- Instead, you have to use their value --------
    • Set MyIntegerVar = (Hero level of (Triggering unit))
    • Set MyIntegerVar = (Load Label of Category from (Last created game cache))

The GUI action is there, and this is the only explanation I could come up with for why you wouldn't be able to find it. x)
 

ludnica

Long gone
Reaction score
61
Appreciate your help there, mate. I still can't get my spell to work, but this is dandy fine.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top