You’re getting the error message because you have 3 ‘(’ on that line but only 2 ‘)’…
TR
You’re getting the error message because you have 3 ‘(’ on that line but only 2 ‘)’…
TR
Hi Tarot_Redhand,
Not sure what you mean. You saying I have three brackets? I only see 2. Can you show me what you mean by putting in the script part as it should be. Thanks.
DelayCommand( => 1
AssignCommand( => 1
AssignJumpToLocation( => 1
That makes 3 opening brackets, but there are only 2 closing ones on the highlighted line.
Hi 4760
I’m not sure where in the portion below where you would put those you mentioned above. Can you do it on the portion below - repost the changes to what I have below:
break;
}
// Show the spell impact visual effect.
effect eImpact = EffectVisualEffect( VFX_FNF_SMOKE_PUFF );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, GetLocation( oCaster ));
{
iFace = d100();
location lPC1 = Location(oArea, vOM1, IntToFloat(iFace));
DelayCommand(fDelay, AssignCommand(OBJECT_SELF, ActionJumpToLocation(lPC1));
fDelay = (IntToFloat(i)*6.0f)+2.0f;
i++;
}
}
DelayCommand(fDelay, AssignCommand(OBJECT_SELF, ActionJumpToLocation(lPC1));
Just start on the left and count all the ‘(’ then count all the ‘)’. The above should really be
DelayCommand(fDelay, AssignCommand(OBJECT_SELF, ActionJumpToLocation(lPC1)));
That is what that error message was telling you.
TR
Hi Tarot_Redhand
I did that and then I got the following error. Even with the semicolon out or in I get the same message…now what?
Same mistake, but this time with a ‘)’ too many.
ApplyEffectAtLocation ( DURATION_TYPE_INSTANT, eImpact, GetLocation ( oCaster ) ) );
See the italic and bold pairs of brackets? You open two and close three, so the compiler complains it gets a ‘)’ instead of a ‘;’
Tip
To make sure everything’s fine, count the opening brackets and the closing brackets, you should have the same number.
One way to make sure you won’t miss any is to close the bracket immediately after the opening one, and then continue to type within.
For instance:
ApplyEffectAtLocation();
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation());
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(oCaster));
Ok…did that along with the line below it which also required another bracket, BUT now it gives me the error below. Even when I take out that closing symbol I get the same error:
Copy and paste the whole code of your function into a text box on here so we can see what’s going wrong.
Alternatively, if you are on windows, get yourself notepad++. Then copy and paste into it. It has tools that will help you to find where you are going wrong and fix it yourself.
TR
Here you go…have at it…tell me what is wrong if you can:
void main()
{
object oArea = GetArea(OBJECT_SELF);
float fDelay = 2.0f;
int i;
int pn;
int iFace;
vector vOM1;
while (i < d6(2))
{
pn = d4();
vOM1 = GetPosition(OBJECT_SELF);
switch (pn)
{
case 1:
vOM1.x += IntToFloat(d8());
vOM1.y += IntToFloat(d8());
break;
case 2:
vOM1.x -= IntToFloat(d8());
vOM1.y += IntToFloat(d8());
break;
case 3:
vOM1.x += IntToFloat(d8());
vOM1.y -= IntToFloat(d8());
break;
case 4:
vOM1.x -= IntToFloat(d8());
vOM1.y -= IntToFloat(d8());
break;
}
// Show the spell impact visual effect.
effect eImpact = EffectVisualEffect( VFX_FNF_SMOKE_PUFF );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, GetLocation( oCaster ));
{
iFace = d100();
location lPC1 = Location(oArea, vOM1, IntToFloat(iFace));
DelayCommand(fDelay, AssignCommand(OBJECT_SELF, ActionJumpToLocation(lPC1)));
fDelay = (IntToFloat(i)*6.0f)+2.0f;
i++;
}
Your posted code is missing one/two ‘}’ at the end (one is probably a copy&paste error). This is what the compiler tries to tell you with ERROR: UNEXPECTED END COMPOUND STATEMENT. Formating your code properly usually helps to find these errors.
Then there’s a undefined ‘oCaster’ in
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, GetLocation( oCaster ));
Should be OBJECT_SELF perhaps?
Fix these errors and the script will compile.
I put an extra " } " on the next line at the bottom…nope…then I put another like below:
}
}
}
nope none of that worked…not one, not two, not three…
You mean replace the ( oCaster) with OBJECT_SELF ?
Can you just post the part that needs fixing please as I have tried several ways…still can’t get this to work
Hi Kamiryn,
Thanks again for your help. It compiled…like you said. I just added the third " }} on the end. The below script now works. now to test it:
void main()
{
object oArea = GetArea(OBJECT_SELF);
float fDelay = 2.0f;
int i;
int pn;
int iFace;
vector vOM1;
while (i < d6(2))
{
pn = d4();
vOM1 = GetPosition(OBJECT_SELF);
switch (pn)
{
case 1:
vOM1.x += IntToFloat(d8());
vOM1.y += IntToFloat(d8());
break;
case 2:
vOM1.x -= IntToFloat(d8());
vOM1.y += IntToFloat(d8());
break;
case 3:
vOM1.x += IntToFloat(d8());
vOM1.y -= IntToFloat(d8());
break;
case 4:
vOM1.x -= IntToFloat(d8());
vOM1.y -= IntToFloat(d8());
break;
}
// Show the spell impact visual effect.
effect eImpact = EffectVisualEffect( VFX_FNF_SMOKE_PUFF );
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eImpact, GetLocation( OBJECT_SELF ));
{
iFace = d100();
location lPC1 = Location(oArea, vOM1, IntToFloat(iFace));
DelayCommand(fDelay, AssignCommand(OBJECT_SELF, ActionJumpToLocation(lPC1)));
fDelay = (IntToFloat(i)*6.0f)+2.0f;
i++;
}
}
}
Works!!!
Only one puff of smoke on the first blink…but I’m ok with that. Thanks!!
Another spell done.
I will release this to the vault and give all of you credit for this )
Much appreciated guys.
I am working on spells…lol…as if you all haven’t noticed…lol
Learning lots from all of you. I have so many ideas, but no real scripting skills.
I just released this to the vault…thanks all of you. I gave you all credit.
Can you recommend a better effect that would look better than a puff of smoke?
This is not a recommendation. Look for effects with “summon” in the name and you might find something you like. Look into the NWN-lexicon. Most of the effects are discribed there.
Thanks Mmat
You can install this: Customize Character Override Hak Extended Edition (CCOHEE) | The Neverwinter Vault
Among lots of other things it will let you cycle through all the existing VFXs. Might help you in finding a VFX you like for your spell.
It’s actually 2d6 puffs of smoke but they are all in the same place at the same time
Glad you got something you are happy with.
Thanks you all…you guys always pull through for me. Thanks.