C
C#3y ago
.fegan

❔ this is my code and error can someone help?

12 Replies
canton7
canton73y ago
spawnEnemy(spawnEnemy(....? (on line 23)
Ꜳåąɐȁặⱥᴀᴬ
why are you calling spawnEnemy inside spawnEnemy
Angius
Angius3y ago
Also, why did VS not see it as an error immediately...? Probably not set up properly to work with Unity?
Suiram1
Suiram13y ago
The error means that you call spawnEnemy with without the enemy parameter. More precisely you call StartCoroutine and as a parameter you use the return value of spawnEnemy and as the first parameter of it you use the return value of spawnEnemy, but when you call spawnEnemy as the first line you only enter the parameter interval and not enemy. Overall I have to say that line 23 in your code makes very little sense in my opinion. Even if you specified the parameter enemy, since spawnEnemy calls itself in SpawnEnemy and as far as I can see there is no termination condition, an infinite loop would result.
.fegan
.feganOP3y ago
how do I do that
Angius
Angius3y ago
$unitytools
MODiX
MODiX3y ago
Quickstart: Install & configure Visual Studio Tools for Unity
Quickstart: Learn how to connect Unity and Visual Studio for cross-platform development. Visual Studio Tools for Unity offers support for writing and debugging.
Angius
Angius3y ago
Ah, disregard the second bot message Only the first one applies
.fegan
.feganOP3y ago
cause I noticed intellisense never works for me
Angius
Angius3y ago
A dead giveaway it hasn't been set up properly, then You probably open loose .cs files or something, instead of opening the project as a whole
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?