From 004abbcfb6b006c6335477521b4aa73a3e113e2a Mon Sep 17 00:00:00 2001 From: Entrox-Licher Date: Sat, 1 Jul 2023 18:42:27 -0400 Subject: [PATCH] Fixed an issue with trauma and deck IDs importing --- src/accessories/CampaignImporterExporter.ttslua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/accessories/CampaignImporterExporter.ttslua b/src/accessories/CampaignImporterExporter.ttslua index bf1a1642..a2d3463b 100644 --- a/src/accessories/CampaignImporterExporter.ttslua +++ b/src/accessories/CampaignImporterExporter.ttslua @@ -143,11 +143,11 @@ function createCampaignFromToken(importData) --create chaos bag chaosBagApi.setChaosBagState(importData["bag"]) --populate trauma values - if importData[4] then + if importData["trauma"] then updateCounters(importData["trauma"]) end --populate ArkhamDB deck IDs - if importData[5] then + if importData["decks"] then deckImporterApi.setUiState(importData["decks"]) end --set investigator count @@ -194,9 +194,10 @@ function createCampaignToken(_, _, _) broadcastToAll("Campaign log not found!", Color.Red) return end + local traumaValues = nil local counterData = campaignLog.getVar("ref_buttonData") if counterData ~= nil then - local traumaValues = {} + traumaValues = {} printToAll("Trauma values found in campaign log!", "Green") for i = 1, 10, 3 do traumaValues[1 + (i - 1) / 3] = counterData.counter[i].value @@ -212,7 +213,6 @@ function createCampaignToken(_, _, _) return end local campaignGuidePage = campaignGuide.Book.getPage() - local campaignData = { box = campaignBoxGUID, log = campaignLog.getData(),