Author Topic: Addon I made isn't showing in Custom/Addon (InGame)  (Read 862 times)

When I boot up my game and go to Custom/Addon my addon that I made isn't there. Can someone help me figure out why it isn't showing up?
I'll give you the description.txt, and server.cs

It shows up fine for me. Are you sure the folder name is the same as that in namecheck.txt?

Nonetheless, there are some problems with the code itself. You are overwriting datablocks and functions from Weapon_Sword. Once you get the weapon loading properly, you'll want to remove or replace it all. For instance, swordImage should be replaced with something like eustaceImage. Likewise, if you are going to use a different sound for hitting, you should replace swordHitSound with eustaceHitSound, and change the filename parameter. Otherwise, if you just want to use the same hit sound as the sword, don't bother creating the swordHitSound datablock a second time. Just reuse, since Weapon_Sword will create it for you.

As another note, whenever you are using code from another add-on, make sure you run
Code: [Select]
forceRequiredAddOn("ADDON_NAME");
to load in it's code. Also, when you do this, you'll want to check that the add-on actually loaded. To do that, you can put this at the top of your server.cs:
Code: [Select]
if(forceRequiredAddOn("ADDON_NAME") == $Error::AddOn_NotFound) {
error("ADDON_NAME could not be loaded!");
return;
}
The return will stop your code from running when the add-on cannot be found.
« Last Edit: January 02, 2018, 06:04:30 AM by Platypi »