Blockland Forums > Modification Help

Using %blah['blah'] stuff.

Pages: (1/6) > >>

otto-san:

I know what these do, but how to use them is unclear.

Can anyone explain? I'd really like to know how to do this.

Chrono:

First mistake is '.

The purpose of them is being able to use values in variable names.

For example, $DRPG::Nations::Wealth[%nation]

Desolation:

You're also able to use them like this. They're named "Arrays" by the way.


--- Code: ---%nation = "ANation";
%leader = "People";
$DRPG::Nations::Wealth[%nation,%leader];

--- End code ---


Chrono:

Although a good example, that would be a bad method of making a nation wealth system.

Desolation:


--- Quote from: Chrono on October 13, 2010, 10:59:12 PM ---Although a good example, that would be a bad method of making a nation wealth system.

--- End quote ---

You are correct sir, I just wanted to relate it with your example.

Pages: (1/6) > >>

Go to full version