OOO script error when I try to recompile the script

Post » Sat Aug 13, 2011 9:55 pm

Hello everyone,I need to recompile this script called "LightOfDawnPowerGrowthA" contained in Oscuro's Oblivion Overhaul.esm.When I try to recompile the script with CSE,I get this error : "Invalid Begin/End block structure on line 220".This is the script:

Spoiler
scn LightOfDawnPowerGrowthA; Created: Jorge "Oscuro" Salgado; dev_akm added vampire punishment, delayTimer, and quest stage checks; sound effects by MadCat221; Flame effect swapping by dev_akmshort ChangeSwordAshort ChangeSwordBshort ChangeSwordCfloat delayTimershort swapDelayshort upgradeDelayshort swapCapableBegin OnAdd Player	Message " "	Message " "	Player.RemoveItem WeapLightOfDawnNoFlameA 1		if ( Player.GetItemCount WeapLightOfDawnFlame > 0 )			Message " "		Message " "		Player.UnEquipItem WeapLightOfDawnFlame		Set ChangeSwordA to 1	endifEndBegin OnEquip Player	Set OOOLightOfDawn to 1	Set delayTimer to 0	Set swapDelay to 0EndBegin OnUnEquip Player	Set OOOLightOfDawn to 0	If PCVampire		Message " "		Message " "		Player.RemoveSpell OOOVampireSwordHurtsB	endifEndBegin GameMode	if ChangeSwordB		return ; new upgrade added, so stop doing anything	endif	if ( GetContainer != Player )		return ; player isn't carrying the sword, so do nothing	endif	if ( OOOLightOfDawn == 0 ) ; catch failed OnEquip block		if ( Player.GetEquipped WeapLightOfDawnFlameA )			Set OOOLightOfDawn to 1			Set delayTimer to 0			Set swapDelay to 0		endif	endif	; Start OBSE Flame Swapping Part 1 =======================	if OOOCheckOBSE.Version >= 13 ; OBSE 13 or higher required for Flame effect swapping		set swapCapable to 1	else		if OOOLightOfDawnUseFlame			Message "Usa OBSE 1.3 o una versione più recente e setta l'opzione OOOLightOfDawnUseFlame a 1 per attivare l'effetto fiammeggiante.Versione OBSE Corrente: %.2f ", OOOCheckOBSE.Version			Set OOOLightOfDawnUseFlame to 0		endif		set swapCapable to 0	endif	; End OBSE Flame Swapping Part 1 =======================	if ChangeSwordA ; just upgraded to this blade		if ( upgradeDelay == 0 )			set upgradeDelay to 1			return		elseif ( upgradeDelay == 3 ) ; wait 3 frames before removing old sword			if ( Player.GetItemCount WeapLightOfDawnFlame > 0 )					Message " "				Message " "				Player.RemoveItem WeapLightOfDawnFlame 1			endif			Set upgradeDelay to 4			return		elseif ( upgradeDelay == 7 ) ; wait 3 more frames			if ( delayTimer == 0 ) ; delay the quest update				Message "  "				Message "  "				Player.EquipItem WeapLightOfDawnFlameA				Set delayTimer to 4				return			elseif ( delayTimer > 0 )				Set delayTimer to delayTimer - GetSecondsPassed				if ( delayTimer == 0 )					Set delayTimer to -1				endif				return			else				SetStage OOOLightOfDawnQuest 60				MessageBox "Un'ondata di energia scorre attraverso me.Le mie mani tremano violentemente mentre provo a tener salda la presa sulla Luce dell'Alba.La spada,la lama intrisa di sangue di vampiro,assorbe la vita della vile creatura.Posso avvertire il potere della spada risvergliarsi leggermente."				Set ChangeSwordA to 0				Set delayTimer to 0				Set upgradeDelay to -1 ; finished				return			endif		else ; count			Set upgradeDelay to upgradeDelay + 1			return		endif		endif	if ( OOOVampDeadCount >= 200 )		if ( GetStage OOOLightOfDawnQuest < 70 )			if ( delayTimer == 0 )				PlaySound AMBObGateMini01Equip				Set delayTimer to 7				;Message "delayTimer: %.2f ", delayTimer				return			elseif ( delayTimer > 0 )				Set delayTimer to delayTimer - GetSecondsPassed				if ( delayTimer == 0 )					Set delayTimer to -1				endif				;Message "delayTimer: %.2f ", delayTimer				return			else				Message " "				Message " "				Player.AddItem WeapLightOfDawnFlameB 1				if swapCapable 					if OOOLightOfDawnFlameOnA ; if this sword is flaming, make the upgrade flaming, too						SetModelPath "va\weapons\LoD_2h_taint03_flame.nif" WeapLightOfDawnFlameB						Set OOOLightOfDawnFlameOnB to 1					endif				endif				Set ChangeSwordB to 1				return			endif		endif	endif	; Start OBSE Flame Swapping Part 2 =======================	if swapCapable 		if OOOLightOfDawnUseFlame			if ( swapDelay == 1 ) ; start swap process				set swapDelay to 2				Message "  "				Message "  "				Player.UnEquipItem WeapLightOfDawnFlameA			elseif ( swapDelay > 1 && swapDelay < 6 ) ; wait 5 frames				set swapDelay to swapDelay + 1			elseif ( swapDelay > 0 )				Message "  "				Message "  "				Player.EquipItem WeapLightOfDawnFlameA				set swapDelay to -1 ; finish swap						elseif ( Player.GetEquipped WeapLightOfDawnFlameA == 0 )				Return ; if we're not using this sword, do nothing			else				if Player.IsWeaponOut					if ( OOOLightOfDawnFlameOnA == 0 )						set OOOLightOfDawnFlameOnA to 1						Set swapDelay to 1						SetModelPath"va\weapons\LoD_2h_taint04_flame.nif" WeapLightOfDawnFlameA					endif				else					if OOOLightOfDawnFlameOnA						Set OOOLightOfDawnFlameOnA to 0						Set swapDelay to 1						SetModelPath"va\weapons\LoD_2h_taint04_noflame.nif" WeapLightOfDawnFlameA					endif				endif			endif		endif	endif		; End OBSE Flame Swapping Part 2 =======================		If PCVampire		If PCVampire > 0			if ( delayTimer == 0 )				Message "La spada brucia terribilmente le tue mani.Non tollererà che sia impugnata da un vampiro."				Message " "				Message " "				Player.AddSpell OOOVampireSwordHurtsB				Set delayTimer to GetSecondsPassed				Set delayTimer to 6			elseif ( delayTimer > 0 )				Set delayTimer to delayTimer - GetSecondsPassed			else				Message " "				Message " "				Player.RemoveSpell OOOVampireSwordHurtsB				Set OOOLightOfDawn to 0				Player.UnEquipItem WeapLightOfDawnFlameA				Player.Drop WeapLightOfDawnFlameA 1				Set delayTimer to 0			endif		endif	endif	End;Begin MenuMode;	If PCVampire;		if ( delayTimer > 0.01 );			Set delayTimer to 0;		endif;	endif;end


the latest line is the 220th.What should I do to fix the problem?I've tried to recompile the script without using CSE,but it doesnt recognise the "setmodelpath" command :/
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Sun Aug 14, 2011 1:14 am

Get rid of the semicolon in front of the End...... Is there more to the script than that??
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am

Post » Sun Aug 14, 2011 5:48 am

Well yes..let me check!THE CS is not working anymore damn-.-" I'll edit as soon as I get it working
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Sun Aug 14, 2011 7:46 am

full script added in the open post..

@HeyYou if I delete the semicolon in front of the End,the CSE tells me that there must be a "begin" and a "end"! Instead,if I remove every semicolon,I can recompile the script
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Sun Aug 14, 2011 4:19 am

I'm looking for a fast and clear answer..
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am

Post » Sat Aug 13, 2011 11:52 pm

I'm looking for a fast and clear answer..

It's a bug in OBSE, I believe. I thought it was a bug in CSE, but ShadeMe pointed out that the error's dialog box clearly says 'OBSE'.

What you need to do is change the final line to anything other than 'end', 'endif', or 'begin'. Just put a 'z' in front of the 'end' (so the line reads '; zend') and that will fix it.

Or completely delete the commented-out block... ;)

Eloise
User avatar
asako
 
Posts: 3296
Joined: Wed Oct 04, 2006 7:16 am


Return to IV - Oblivion