Author Topic: Adding an Argument to a Prefs Value  (Read 591 times)

For some reason, $Pref::Server::Coordinates::save[%savename] doesn't work. Why?

Does %savename exist?


What you're doing here is just creating an array, not "adding an argument" so you still need to do:

$Pref::Server::Coordinates::save[%savename] = 1;

To give it a value, or it has a value of null.

This means for seperate relatives of that, I have to do...

$Pref::Server::CashStorage::storedCash[%storage] = "CashAmount";
$Pref::Server::CashStorage::storageOwner[%storage] = "OwnerName";

...but it solves my problem. Thanks.

You can do something like $Pref::Server::CashStorage::storedData[%storageCount] and just separate the values by TABs, for more organisation.