Script is cut off when pasting
crasah opened this issue ยท 2 comments
Some of the scripts get cut off when executed via the addon. I am using version 11.2.0-20250904-1 but this didn't start with this version, it's been happening for some time.
For example, below script from Wowhead for tracking delve keys:
/run a={0,1,2,3}s=0 k=0 for i=1,4 do if C_QuestLog.IsQuestFlaggedCompleted(84736+a[i])then s=s+1 end if C_QuestLog.IsQuestFlaggedCompleted(91175+a[i])then k=k+1 end end print"Claimed:"print("Keys:",k,"/ 4")print("Key Shards:",s*50,"/ 200 (",s,"/ 4 )")
The part after the last 4 is pasted separately, so the script fails with the below error and my character just says ' )")'.
1x [string "a={0,1,2,3}s=0 k=0 for i=1,4 do if C_QuestLog.IsQuestFlaggedCom..."]:1: unfinished string near '<eof>'
[Blizzard_ChatFrameBase/Shared/SlashCommands.lua]:859: in function '?'
[Blizzard_ChatFrameBase/Mainline/ChatFrame.lua]:3102: in function 'ChatEdit_ParseText'
[Blizzard_ChatFrameBase/Mainline/ChatFrame.lua]:2754: in function <Blizzard_ChatFrameBase/Mainline/ChatFrame.lua:2753>
[C]: in function 'ChatEdit_SendText'
[PasteNG/Modules/Dialog/DialogModule.lua]:240: in function 'SendChatMessageWrapper'
[PasteNG/Modules/Dialog/DialogModule.lua]:313: in function 'SendPaste'
[PasteNG/Modules/Dialog/DialogModule.lua]:409: in function <...rfacePasteNG/Modules/Dialog/DialogModule.lua:407>
Locals:
msg = "a={0,1,2,3}s=0 k=0 for i=1,4 do if C_QuestLog.IsQuestFlaggedCompleted(84736+a[i])then s=s+1 end if C_QuestLog.IsQuestFlaggedCompleted(91175+a[i])then k=k+1 end end print"Claimed:"print("Keys:",k,"/ 4")print("Key Shards:",s*50,"/ 200 (",s,"/ 4"
userScriptsDisabled = false
But if I copy the script (even from the Paste window) and paste it myself to chat, it works fine.
Hey,
I will take a look into what is causing it a bit later.
My guess is that is it due to it trying to split the line.