C
C#4mo ago
am steve

Error CS0246

i am making a terraria mod and i am trying to make a sword that shoots projectiles, but this shows up, and i dont know how to fix it. i read the articles for each but did not understand how to fix it.
No description
15 Replies
am steve
am steveOP4mo ago
if the code is needed i can send
Pobiega
Pobiega4mo ago
that error just means that it couldn't find the class "TestSwordProjectile" is that a class you made, or one from terraria?
am steve
am steveOP4mo ago
i made the projectile, if thats what you mean
Pobiega
Pobiega4mo ago
okay, can you show the code for TestSwordProjectile AND where you are getting the error?
am steve
am steveOP4mo ago
No description
am steve
am steveOP4mo ago
No description
Pobiega
Pobiega4mo ago
so, your projectile is in the Colesmod.Content.Projectiles namespace and your weapon is in ColesMod.Content.Items.Weapons you need to add a using Colesmod.Content.Projectiles; to the top of your weapon file also, note that you called it ColesMod in one place, and Colesmod in the other that doesnt look very good, so I'd fix that
am steve
am steveOP4mo ago
do you mean the weapons folder or the code of the test sword
Pobiega
Pobiega4mo ago
code for the sword at the very top of that file
am steve
am steveOP4mo ago
also by top do you mean i should put it as the first line or what
Pobiega
Pobiega4mo ago
see the other using ....; statements? just put it near them
am steve
am steveOP4mo ago
ty okay, so the code has no errors but the projectile doesnt exist
Pobiega
Pobiega4mo ago
¯\_(ツ)_/¯ That sounds like something to ask people who know terraria modding
am steve
am steveOP4mo ago
fair okay thanks for the help tho
Pobiega
Pobiega4mo ago
this is a general purpose C# server, we can answer questions about the C# part, but not about the specifics regarding terraria np
Want results from more Discord servers?
Add your server