I have a unknown error and i can’t fix it. When i use hero.command(soldier, “attack”, enemy) i have an error:
Argument error: COMMAND’s argument MINION should have type UNIT, but got OBJECT
code:
if you now please tell me
I have a unknown error and i can’t fix it. When i use hero.command(soldier, “attack”, enemy) i have an error:
code:
if you now please tell me
Hello, after a quick look, I don’t see any problems with the hero.command() line or the variables linked to it. I’m able to run the code with no problems with the first part of Summit Gates. My only thought is that you haven’t defined the optional units in the .findByType() method (see below). You may be trying to command an enemy archer and you can’t do that. Adding the second optional part will ensure you are only selecting your friendly archers. If you are still having troubles, please post all of the code so we cans see if there are other components that are giving you an issue.
hero.findByType("archer", hero.findFriends())
One extra note, a “griffin-rider” is your friend while the “fangrider” is an enemy.
Below is a link to walk you through how to post the code directly into the forum without a screenshot. This lets others copy/paste your code to debug it in their console quickly.
THANK YOU VERY MUCH!!! It works!))) I thoght only I have archers))
Glad to help!! The optional units portion becomes very important during the multiplayer battles where you can have the same type of armies on the both sides.
YEEES!
Congrats!! Great job! It is a long level with some unique challenges. It is a great feeling to complete this one.
thanks, i have very grate fillings))
Please see my other post about posting solutions.
Danny