Posts: 254
Threads: 16
Joined: Oct 2013
Thanks: 3
Given 20 thank(s) in 18 post(s)
07-02-2015, 07:40 AM
(This post was last modified: 07-02-2015, 07:42 AM by SamJBarney.)
Whoops. Thanks for catching that. Just went and fixed it.
The thing is, I'm having the issue with all of them: Wheat, Carrots, and Potatoes.
I've been thinking about it, and it might be due to passing World:SpawnItemPickups an empty cItems instance. Well, except it can spawn along with other items... Hmmm....
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Your code is already checking for empty cItems instance. I'm not too sure about the last param to SpawnItemPickups, try setting it to zero for a quick test. Other than that, no idea what could be wrong, seems alright to me.
Posts: 513
Threads: 10
Joined: May 2014
Thanks: 138
Given 89 thank(s) in 75 post(s)
I tested your code, it works on my side
Posts: 254
Threads: 16
Joined: Oct 2013
Thanks: 3
Given 20 thank(s) in 18 post(s)
Yeah, I don't know what was causing it. It stopped happening randomly, and I can't get it to happen again.