31
Ask a Question / Re: Character behavior
« on: August 06, 2020, 10:45:39 pm »
The number of items in the List that I am doing will variate based on the pet's emotions. So since I don't know the number, I created a Global number attribute, created an Always event to set it to the number of items in the list.
It works, but after a while of calling out the emoticons, the game crashed again and I think it is the same line 73 which is giving problems (I'll fix the emoticon has value and alive later on). I'm not sure if what I did was correct.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.stencyl::Engine/getRecycledActorOfTypeOnLayer()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2337]
at com.stencyl::Engine/getRecycledActorOfType()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2322]
at com.stencyl.behavior::Script$/createRecycledActor()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\behavior\Script.hx:1814]
at scripts::Design_14_14_EmoticonList/_customEvent_CreateEmoticon()[C:\Users\YunXiang\AppData\Roaming\Stencyl\stencylworks\games-generated\Virtual Pet with list\Source\scripts\Design_14_14_EmoticonList.hx:73]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at com.stencyl.behavior::BehaviorManager/call2()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\behavior\BehaviorManager.hx:245]
at com.stencyl.models::Actor/say()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\models\Actor.hx:3697]
at MethodInfo-9486()[C:\Users\YunXiang\AppData\Roaming\Stencyl\stencylworks\games-generated\Virtual Pet with list\Source\scripts\ActorEvents_0.hx:122]
at com.stencyl.models::Actor/innerUpdate()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\models\Actor.hx:1492]
at com.stencyl::Engine/update()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2680]
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]
It works, but after a while of calling out the emoticons, the game crashed again and I think it is the same line 73 which is giving problems (I'll fix the emoticon has value and alive later on). I'm not sure if what I did was correct.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.stencyl::Engine/getRecycledActorOfTypeOnLayer()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2337]
at com.stencyl::Engine/getRecycledActorOfType()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2322]
at com.stencyl.behavior::Script$/createRecycledActor()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\behavior\Script.hx:1814]
at scripts::Design_14_14_EmoticonList/_customEvent_CreateEmoticon()[C:\Users\YunXiang\AppData\Roaming\Stencyl\stencylworks\games-generated\Virtual Pet with list\Source\scripts\Design_14_14_EmoticonList.hx:73]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/<anonymous>()
at com.stencyl.behavior::BehaviorManager/call2()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\behavior\BehaviorManager.hx:245]
at com.stencyl.models::Actor/say()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\models\Actor.hx:3697]
at MethodInfo-9486()[C:\Users\YunXiang\AppData\Roaming\Stencyl\stencylworks\games-generated\Virtual Pet with list\Source\scripts\ActorEvents_0.hx:122]
at com.stencyl.models::Actor/innerUpdate()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\models\Actor.hx:1492]
at com.stencyl::Engine/update()[D:\Stencyl\Stencyl\plaf\haxe\lib\stencyl\1,00\com\stencyl\Engine.hx:2680]
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]