Here's my armrzone.cfg (it's unmodified):
Code:
ArmorZone
{
Name Body
Chance 44
Layer 13
Layer 20
Layer 22
Layer 5
Layer 17
}
ArmorZone
{
Name Arms
Chance 14
Layer 19
}
ArmorZone
{
Name Head
Chance 14
Layer 6
}
ArmorZone
{
Name Legs/feet
Chance 14
Layer 4
Layer 3
Layer 24
}
ArmorZone
{
Name Neck
Chance 7
Layer 10
}
ArmorZone
{
Name Hands
Chance 7
Layer 7
}
Here's a test text command that should print out the number of armor zones and a list of all of the zone names:
Code:
use uo;
use os;
use cfgfile;
program TestRead(character, textcmd)
var cfg_file := ReadConfigFile("::armrzone");
var cfg_keys := GetConfigStringKeys(cfg_file);
// Only prints out 1!
SendSysMessage(character, "Armor zones: " + cfg_keys.size());
var zones := "";
foreach zone in cfg_keys
zones := zones + " " + cfg_file[zone].Name;
endforeach
// Only prints out "Body"!
SendSysMessage(character, "Zones:" + zones);
endprogram
Only the first zone is loaded, and the rest are ignored. However, it works fine if I give the elements names. Why not simply load all of the elements with "" for their name instead of only loading the first one?
By the way, this took me a LONG time to figure out.

I almost died.