14
« on: October 22, 2020, 10:06:18 am »
I've looked at the error message and it pointed to line 81, which is these blocks of code. However, its the same blocks used for my FoodPreference behavior.
Tpreference and CurrentTpreference are lists, just like foodpreference and currentfoodpreference. Only Tpreferencenumber and PreferenceNumber are number attributes.
It looks the same to me, and I have no idea why it doesn't work. I can set the CurrentTpreference list to be the same as Tpreference. But the error only happens when I try to select an item from the list, be it random or not.
TypeError: Error #1034: Type Coercion failed: cannot convert "ToyA" to Array.
at MethodInfo-10187()[C:\Users\YunXiang\AppData\Roaming\Stencyl\stencylworks\games-generated\Virtual Pet V3\Source\scripts\Design_61_61_TPreference.hx:81]
at com.stencyl.behavior::TimedTask/update()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\behavior\TimedTask.hx:48]
at com.stencyl::Engine/update()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2574]
at com.stencyl::Engine/postUpdate()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2836]
at com.stencyl::Engine/onUpdate()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2828]
The error message is pointing to line 81 right?