Author Topic: Command console spam  (Read 669 times)

My latest add-on uses 3 function scripts:
onAdd
onDamage
onTrigger

All of them work. However, when one of them is used the console says something like:

Code: [Select]
Add-Ons/Vehicle_TBH/Vehicle_TBH.cs (401): Unknown command onTrigger.
They are used quite frequently, so it fills up with these messages. They aren't too important, but why are they errors in the console?

Post one of the functions. Or all of them.

Code: [Select]
function tbhVehicle::onDamage(%this,%obj)
{
   parent::onDamage(%this,%obj);

%damLvl = %obj.getDamageLevel();// sets variable "%damLvl"

if(%damLvl >= 70) // checks damage level (30 health remaining?)
{
%obj.mountImage(heliDamageImage,1);// fire!
       %obj.PlayAudio(2,HelicopterDamageSound);
}

}

This one is the most common

Press ctrl+g, type in 401, and find the function around line 401.

Press ctrl+g, type in 401, and find the function around line 401.

Where? It didn't work in-game or in the Blockland menu

You apparently knew how to open the file.
Open Add-Ons/Vehicle_TBH/Vehicle_TBH.cs and do the above steps.

Control G doesn't work in Blockland or the script. What do you mean?

Control G doesn't work in Blockland or the script. What do you mean?
In notepad.
Oh, and with word wrap off.

Code: [Select]
   function tbhVehicle::onTrigger(%this,%obj,%client)
   {
Parent::onTrigger(%this,%obj);

%obj.setvelocity("0 0 1");
   }

The parent:onTrigger clip is line 401

This is a really annoying glitch, why am I not getting answers? What does line 401 have to do with anything?

The parent:: calls the function that existed before your script was loaded, it's going to cause those errors if the function didn't exist before you made it.

Than you, that worked :)