C
C#2y ago
.fegan

❔ this is my code and error can someone help?

12 Replies
canton7
canton72y ago
spawnEnemy(spawnEnemy(....? (on line 23)
Omnissiah
Omnissiah2y ago
why are you calling spawnEnemy inside spawnEnemy
Angius
Angius2y ago
Also, why did VS not see it as an error immediately...? Probably not set up properly to work with Unity?
Suiram1
Suiram12y 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
.feganOP2y ago
how do I do that
Angius
Angius2y ago
$unitytools
MODiX
MODiX2y 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
Angius2y ago
Ah, disregard the second bot message Only the first one applies
.fegan
.feganOP2y ago
cause I noticed intellisense never works for me
Angius
Angius2y 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
Accord2y 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.
Want results from more Discord servers?
Add your server