Macro works in b89 but not in b91

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
Altrunchen
Giant
Posts: 135
Joined: Sun Dec 02, 2012 3:01 pm

Macro works in b89 but not in b91

Post by Altrunchen »

This macro of mine works just fine in b89 but I get a stack overflow when I try to run it in b91:

Code: Select all

[h: SkillList = "Appraise, Balance, Bluff, Climb, Concentration, Decipher Script, Diplomacy, Disable Device, Disguise, Escape Artist, Forgery, Gather Information, Handle Animal, Heal, Hide, Intimidate, Jump, Listen, Move Silently, Open Lock, Ride, Search, Sense Motive, Sleight of Hand, Spellcraft, Spot, Survival, Swim, Tumble, Use Magic Device, Use Rope"]

[h: ranks = 0]

[h:status=input(
"selected|"+SkillList+"|Which skill check is being made?|LIST|SELECT=0",
"Bonus|0|What is the modifier?")]
[h:abort(status)]

[h, switch(selected):
	case 0: ranks = ranks+getProperty("Appraise");
	case 1: ranks = ranks+getProperty("Balance");
	case 2: ranks = ranks+getProperty("Bluff");
	case 3: ranks = ranks+getProperty("Climb");
	case 4: ranks = ranks+getProperty("Concentration");
	case 5: ranks = ranks+getProperty("DecipherScript");
	case 6: ranks = ranks+getProperty("Diplomacy");
	case 7: ranks = ranks+getProperty("DisableDevice");
	case 8: ranks = ranks+getProperty("Disguise");
	case 9: ranks = ranks+getProperty("EscapeArtist");
	case 10: ranks = ranks+getProperty("Forgery");
	case 11: ranks = ranks+getProperty("GatherInformation");
	case 12: ranks = ranks+getProperty("HandleAnimal");
	case 13: ranks = ranks+getProperty("Heal");
	case 14: ranks = ranks+getProperty("Hide");
	case 15: ranks = ranks+getProperty("Intimidate");
	case 16: ranks = ranks+getProperty("Jump");
	case 17: ranks = ranks+getProperty("Listen");
	case 18: ranks = ranks+getProperty("MoveSilently");
	case 19: ranks = ranks+getProperty("OpenLock");
	case 20: ranks = ranks+getProperty("Ride");
	case 21: ranks = ranks+getProperty("Search");
	case 22: ranks = ranks+getProperty("SenseMotive");
	case 23: ranks = ranks+getProperty("SleightofHand");
	case 24: ranks = ranks+getProperty("Spellcraft");
	case 25: ranks = ranks+getProperty("Spot");
	case 26: ranks = ranks+getProperty("Survival");
	case 27: ranks = ranks+getProperty("Swim");
	case 28: ranks = ranks+getProperty("Tumble");
	case 29: ranks = ranks+getProperty("UseMagicDevice");
	case 30: ranks = ranks+getProperty("UseRope")]

[h: SkillName = listGet(SkillList, selected,",")]
[h: check = 0]

[h: StrList = "3,16,27"]
[h: DexList = "1,9,14,18,19,20,23,28,30"]
[h: ConList = "4"]
[h: IntList = "0,5,7,10,21,24"]
[h: WisList = "13,17,22,25,26"]
[h: ChaList = "2,6,8,11,12,15,29"]

[h, if(check == 0),CODE:
{
	[h, if(listFind(StrList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("StrMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h, if(check == 0),CODE:
{
	[h, if(listFind(DexList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("DexMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h, if(check == 0),CODE:
{
	[h, if(listFind(ConList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("ConMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h, if(check == 0),CODE:
{
	[h, if(listFind(IntList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("IntMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h, if(check == 0),CODE:
{
	[h, if(listFind(WisList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("WisMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h, if(check == 0),CODE:
{
	[h, if(listFind(ChaList,selected,",") != -1),CODE:
	{
	[h: AbMod = getProperty("ChaMod")]
	[h: check = 1]
	};
	{}]
};
{}]

[h: roll = 1d20]

<span style="color:black"><b><u>[r: SkillName] Check</u></b></span>
<br>
<span style="color:red">[t: roll+AbMod+ranks+Bonus]</span>

[if(roll == 1),CODE:
	{
	 <span style="color:red"><b><i>Critical Failure!</i></b></span>
	};
	{}]

[if(roll == 20),CODE:
	{
	 <span style="color:green"><b><i>Critical Success!</i></b></span>
	};
	{}]
I will fiddle with some settings here and there but honestly I have no clue what the problem is.

EDIT: Nevermind ^.^;;; All I had to do was to change the minimum memory in my b91 maptools back to 64 from 256. My bad.
Image

Post Reply

Return to “Macros”