<$BlogRSDUrl$>

Saturday, June 07, 2003

Working on my Module for NWN. Was going fine with my only mistakes being setting variables to the wrong values (and thus not being able to complete quests). Then I run into a brick wall on a well documented and extremely simple peice of code:

void main()
{
//brain Merv with a rock
Effect eSplat = ExtraordinaryEffect(EffectDeath(FALSE, TRUE));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSplat, GetObjectByTag("MERV"));
}

In this case, I'm creating an effect (Extraordinary so it cant be effected by magic by accident) called eSplat. I then set that effect to EffectDeath which will deal 100% hp damage to the target I call later. I said FALSE to the super-gore death and TRUE to damage feedback so the player will see the damage dealt on their screen. Next I call the ApplyEffect line to instantly call eSplat on the target object, MERV.

I checked the syntax like 20 times and found a few examples on the dev boards, one of which is identicle except they named a few more variables. What I can't figure out is why the editor keeps telling me:

sr_splat.nss(4): ERROR: NO SEMICOLON AFTER EXPRESSION

Line 4 being the declaration of the eSplat....but it has the SEMICOLON already! If I take it away, it still wants one. I put in a second and it still wants one. The only place the semicolon should be is at the end of the line. Nothing else needs it. So why does it tell me it wants one?

My only guess is that I'm missing an #include file since that tends to cause these stupid little errors, but I can't find a mention of this function needing one anywhere in the examples or docs.

This page is powered by Blogger. Isn't yours?