RADICALAdrift
Official Terrarian
Hi there,
I keep getting this "Index was outside the bounds of the array" from my mod to do with my GODKnife Projectile, Originally i assumed there was nothing wrong as the code compiles fine but when i enter a world and use the knife as soon as the projectile hits the floor this "Index was outside the bounds of the array" occurs and im not sure why
Section of code in question
Is there something i need to change or not?
Thanks in advance,
Radical
I keep getting this "Index was outside the bounds of the array" from my mod to do with my GODKnife Projectile, Originally i assumed there was nothing wrong as the code compiles fine but when i enter a world and use the knife as soon as the projectile hits the floor this "Index was outside the bounds of the array" occurs and im not sure why
Section of code in question
C:
public override bool OnTileCollide(Vector2 oldVelocity)
{
{
Projectile.Kill();
SoundEngine.PlaySound(2, (int)Projectile.position.X, (int)Projectile.position.Y, 10);
SoundEngine.PlaySound(2, Style: SoundLoader.GetSoundSlot("Assets/Sounds/Wooo"));
}
return false;
}
Thanks in advance,
Radical