Jump to content

Home

Scripting problem. Won't compile


Pikmin

Recommended Posts

I've tried several different things, i just can't get this to compile. It is for k2. KT says unexpected end of file at line 42

 

void main() {
int nParam1 = GetScriptParameter(1);
       object oDarthSion = GetObjectByTag("DarthSion", 0);
switch (nParam1) {
	case 0:
		{
			object oSithAssassin = GetObjectByTag("SithAssassin", 0);
			object object3 = GetObjectByTag("SithAssassin", 1);
			DelayCommand(0.5, AssignCommand(oSithAssassin, ActionMoveToObject(GetObjectByTag("wp_sith_walk1", 0), 0, 1.0)));
			DelayCommand(0.5, AssignCommand(object3, ActionMoveToObject(GetObjectByTag("wp_sith_walk2", 0), 0, 1.0)));
			DelayCommand(0.5, AssignCommand(oSithAssassin, ActionMoveToObject(GetObjectByTag("wp_sith_move1", 0), 0, 1.0)));
			DelayCommand(0.5, AssignCommand(object3, ActionMoveToObject(GetObjectByTag("wp_sith_move2", 0), 0, 1.0)));
			effect efVisual = EffectVisualEffect(8001, 0);
			DelayCommand(2.4, AssignCommand(oSithAssassin, ClearAllEffects()));
			DelayCommand(2.4, AssignCommand(object3, ClearAllEffects()));
			DelayCommand(2.5, ApplyEffectToObject(1, efVisual, oSithAssassin, 5.0));
			DelayCommand(2.5, ApplyEffectToObject(1, efVisual, object3, 5.0));
			DelayCommand(5.0, DestroyObject(GetObjectByTag("hologram", 0), 0.0, 0, 0.0, 0));
			DelayCommand(4.0, SetDialogPlaceableCamera(30));
		break;

	case 1:
		{
			object object19 = GetObjectByTag("SithAssassin", 0);
			object object21 = GetObjectByTag("SithAssassin", 1);
			effect effect3 = EffectVisualEffect(8000, 0);
			ApplyEffectToObject(1, effect3, object19, 20.0);
			ApplyEffectToObject(1, effect3, object21, 20.0);
			object oDarthSion = GetObjectByTag("DarthSion", 0);
			AssignCommand(oDarthSion, ActionPlayAnimation(35, 1.0, (-1.0)));
			DelayCommand(6.0, SetDialogPlaceableCamera(8));
		}
		break;

	case 2:
		DelayCommand(3.0, DestroyObject(GetObjectByTag("DarthSion", 0), 0.0, 0, 0.0, 0));
		ExecuteScript("a_cleanup", OBJECT_SELF, 0xFFFFFFFF);
		StartNewModule("007EBO", "", "", "", "", "", "", "");
              break;
}
}

Link to comment
Share on other sites

Hehe, you would think that. I tired that but it says Error: File extended. Lol It's ok thoguh I got this working with a bunch of smaller scripts.

 

Darth333 was correct, but you need to insert the missing block delimiter in the right place for it to work, not just tack it on at the end of the file, which I suspect you might have done if it still didn't work?

 

More specifically, in case 0 you have an opening block delimiter but not a closing one. I.e. you'd need to either add } after the first break; or remove the { just following case 0: for it to work. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...