Author Topic: Problems with troubleshooting addons  (Read 2934 times)

So when im trouble shooting my addon, i look at the console to check for errors. In my addon ive made particle emitters for things such as missile smoke, muzzle flashes. However for some reason when i load the server, i get errors like:
Code: [Select]
Object 'RocketFireEmitter' is not a member of the 'ParticleEmitterData' data block class Even though i have RocketFireEmitter clearly defined in my effects folder. Same thing goes with sounds. I use custom audio profiles for my sounds. Even though they are clearly defined, i still get the error:
Code: [Select]
Object 'BM95Fire' is not a member of the 'AudioProfile' data block class
What is going on?

How do i fix this?

Could you post your code? You might have incorrectly spelled the datablock class. It has happened to me. It is case-sensitive.

Check if the datablock is initiated BEFORE it is used. Usually the issue is in server.cs where you execute a script that contains a datablock usage before its defined in another script.

Could you post your code? You might have incorrectly spelled the datablock class. It has happened to me. It is case-sensitive.

Check coding help for attachments and posted code

Check if the datablock is initiated BEFORE it is used. Usually the issue is in server.cs where you execute a script that contains a datablock usage before its defined in another script.

Im not too sure what you mean. Does
Code: [Select]
Preload = false;Have anything to do with this?

Because all my Datablocks' preload options have been set to false.

server.cs
Code: [Select]
exec('./a.cs');
exec('./b.cs');

a.cs
Code: [Select]
// projectile datablock
..
particleEmitter = RocketFireEmitter;
...

b.cs
Code: [Select]
...
datablock ParticleEmitterData(RocketFireEmitter) {}
...

In server.cs, a.cs is executed before b.cs and RocketFireEmitter is defined in b.cs
so something like
Code: [Select]
Object 'RocketFireEmitter' is not a member of the 'ParticleEmitterData' data block classis returned because it doesn't exist when a.cs is executed. to fix, change server.cs to
Code: [Select]
exec('./b.cs');
exec('./a.cs');

So for your case, sounds like the effects folder contains scripts that define effects. Make sure it is executed before whatever uses them is.
« Last Edit: August 03, 2015, 04:08:11 PM by Str4tofortress »

OOOOhhhh

Alright let me see what i can do



EDIT: Your my hero Strato, it worked. Thanks!
« Last Edit: August 03, 2015, 04:54:17 PM by Ctrooper »