Total-RP / Total-RP-3-Extended

Extended module for the Total RP 3 add-on for World of Warcraft, adding creation tools.
http://extended.totalrp.com
11 stars 13 forks source link

Lua error when setting a direct string value in a condition #132

Closed Seleves closed 5 years ago

Seleves commented 5 years ago

Since 1.3 I cannot set direct string values anymore. The textbox will not show and I get a Lua error (message below).

My steps:

  1. create a new campaign
  2. switch to "Actions" tab
  3. add any new action
  4. CTRL+click to add a condition
  5. click on the default condition, prefilled with "Unit name (target) is equal to Elsa"
  6. on the right side (value) open the menu and choose Direct Value > String Value

It seems that the value passed to SetText() is a table instead of string.

Message: ...talRP3_Extended_Tools\script/conditions/operands.lua:67: Usage: <unnamed>:SetText("text") Time: Sat Jan 12 13:32:22 2019 Count: 3 Stack: ...talRP3_Extended_Tools\script/conditions/operands.lua:67: Usage: <unnamed>:SetText("text") [C]: in functionSetText' ...talRP3_Extended_Tools\script/conditions/operands.lua:67: in function load' ...lRP3_Extended_Tools\script/conditions/conditions.lua:135: in function <...lRP3_Extended_Tools\script/conditions/conditions.lua:123> ...lRP3_Extended_Tools\script/conditions/conditions.lua:178: in function <...lRP3_Extended_Tools\script/conditions/conditions.lua:157> ...lRP3_Extended_Tools\script/conditions/conditions.lua:653: in function <...lRP3_Extended_Tools\script/conditions/conditions.lua:651> Interface\AddOns\totalRP3\core\impl\ui_tools.lua:254: in function <Interface\AddOns\totalRP3\core\impl\ui_tools.lua:245> Interface\AddOns\totalRP3\core\impl\ui_tools.lua:169: in functionfunc' ...3\libs\MSA-DropDownMenu-1.0\MSA-DropDownMenu-1.0.lua:1183: in function `MSA_DropDownMenuButton_OnClick' ...3\libs\MSA-DropDownMenu-1.0\MSA-DropDownMenu-1.0.lua:156: in function <...3\libs\MSA-DropDownMenu-1.0\MSA-DropDownMenu-1.0.lua:155>

Locals: (temporary) = { 0 = Center = { } help = TRP3_OperandEditorStringHelp { } Right = { } Left = { } title = TRP3_OperandEditorStringText { } } (temporary) =

{ }`

Solanya commented 5 years ago

Hmmm, I cannot reproduce the issue. Editor works just fine for me.

image

Is it happening on a new campaign or one you created before ? If it's the latter, can you export it and share to see if something is wrong with it ?

Solanya commented 5 years ago

Nevermind, I just managed to reproduce by switching to Numeric value then back to String value. Will look into it.

Ellypse commented 5 years ago

I can reproduce the issue on my end, for any effect, even when trying with an item instead of a campaign.

image