Author Topic: Bullstuff syntax error  (Read 772 times)

I don't understand what is wrong with this code, I know that nothing is virtually wrong with it. It says something is wrong with "A" what could that possibly mean?

Quote
Executing Add-Ons/Map_Island/IslandT6.mis.
Add-Ons/Map_Island/IslandT6.mis Line: 41 - Syntax error.
>>> Some error context, with ## on sides of error halt:
   ejectionVelocity = 0.0;

   ejectionOffset   = 1;

   velocityVariance = 0.0;

   thetaMin         = 0;

   thetaMax         = 0;

   phiReferenceVel  = 0;

   phiVariance      = 0;

   lifeTimeMS = 100;

   particles = "AngelFishParticle";

  datablock ParticleEmitterNodeData(##A##ngelFishEmitterNode)

   overrideAdvance = false;

   useEmitterColors = true;

   uiName = "Angel Fish";

};

I don't understand what is wrong with this code, I know that nothing is virtually wrong with it. It says something is wrong with "A" what could that possibly mean?


You can't just define a datablock inside of whatever that is. Post your whole code.

Quote

datablock ParticleData(AngelFishParticle)
{
   dragCoefficient      = 0;
   gravityCoefficient   = 0;
   inheritedVelFactor   = 0;
   windCoefficient      = 0;
   constantAcceleration = 0;
   lifetimeMS           = 500;
   lifetimeVarianceMS   = 0;
   useInvAlpha          = true;
   textureName          = "./particles/AngelFish";
   colors[0]     = "1 1 1 1";
   colors[1]     = "1 1 1 1";
   colors[2]     = "1 1 1 1";
   sizes[0]      = 0.9;
   sizes[1]      = 0.9;
   sizes[2]      = 0.9;
   times[0]      = 0.0;
   times[1]      = 0.2;
   times[2]      = 1.0;
};
datablock ParticleEmitterData(AngelFishEmitter)
{
   ejectionPeriodMS = 3500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   ejectionOffset   = 1;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   lifeTimeMS = 100;
   particles = "AngelFishParticle";
   datablock ParticleEmitterNodeData(AngelFishEmitterNode)
   overrideAdvance = false;
   useEmitterColors = true;
   uiName = "Angel Fish";
};


Quote
      new ParticleEmitterNode() {
      position = "-139.734 -42.0085 7.49971";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      dataBlock = "AngelFishEmitterNode";
      emitter = "AngelFishEmitter";
      velocity = "1";
      pointPlacement = "0";
      spherePlacement = "0";
   };

datablock ParticleEmitterData(AngelFishEmitter)
{
   ejectionPeriodMS = 3500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   ejectionOffset   = 1;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   lifeTimeMS = 100;
   particles = "AngelFishParticle";
   datablock ParticleEmitterNodeData(AngelFishEmitterNode)
   overrideAdvance = false;
   useEmitterColors = true;
   uiName = "Angel Fish";
};

Should be

datablock ParticleEmitterData(AngelFishEmitter)
{
   ejectionPeriodMS = 3500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   ejectionOffset   = 1;
   velocityVariance = 0.0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   lifeTimeMS = 100;
   particles = "AngelFishParticle";
   datablock = "AngelFishEmitterNode";
   overrideAdvance = false;
   useEmitterColors = true;
   uiName = "Angel Fish";
};


If i am incorrect, just wait until someone who likes to work with datablocks comes through.
« Last Edit: September 14, 2011, 08:00:03 AM by infiniteLoop »

Alright now I no longer have a syntax error but I have one last issue.

Quote
Object 'AngelFishEmitterNode' is not a member of the 'GameBaseData' data block class
Add-Ons/Map_Island/IslandT6.mis (0): Register object failed for object (null) of class ParticleEmitterNode.

Alright now I no longer have a syntax error but I have one last issue.


Try taking dataBlock = "AngelFishEmitterNode"; completely.

Try taking dataBlock = "AngelFishEmitterNode"; completely.

I did that, it doesn't work.

I did that, it doesn't work.

Just wait for someone else to help you, I personally hate working with datablocks.

I got it to work thanks.

I removed Datablock ="AngelFishEmitterNode"; and I replaced AngelFishEmitterNode with GenericEmitterNode.


I was using old TBM scripting to help me figure out how to package emitters into maps. Now I know that's not the best idea.