#Error Trying to get a return value of a method that returns "void"??

4 messages · Page 1 of 1 (latest)

pulsar acorn
#

My game keeps trying to summon enemies before they can be removed from their array. But when I try to make it wait I get a weird error.

code:
await Global.enemies.erase(enemy_target_number)

error:
Trying to get a return value of a method that returns "void"

My best guess is that it's saying you can't put an await action on a removal, though that doesn't make much sense? Can someone help please? I'm kind of stuck on this one.

shy orbit
zealous jasper
#

Can you explain what you are trying to achieve exactly? This doesn't sound like you should need an await at all.