Jump to content

OBSE invalid begin/end block structure?


Recommended Posts

Posted

I keep getting a OBSE "invalid begin/end block structure"  error message when trying compile any script.  I get this error on scripts that I know works ok.  Just adding something like 

 

;this is a test

 

gives me the error.

 

Below is a example of script from Basic Primary Hygiene.

 

Scn BPHCheckLocationAllowedFunctionScript

ref cellowner
short objecttype

short allowed

Begin Function {  }

if BPH.ini_location_npc == 1
	SetFunctionValue 1
	return
endif

set cellowner to player.GetParentCellOwner
if cellowner
	set objecttype to GetObjectType cellowner
	if objecttype == 6
		if player.GetInFaction cellowner
			set allowed to 1
		endif
	elseif objecttype == 35
		if player.GetBaseObject == cellowner
			set allowed to 1
		endif
	else
		set allowed to 1
	endif
else
	set allowed to 1
endif

;This is a test
                  
SetFunctionValue allowed

End

All I did was add the line ;This is a test and I get the error.  I've been running this mod for a month so I know the script is ok.   This is the first OBSE mod I messed with.  I have the latest versions of CS and OBSE.  I am running CS through OBSE launcher. 

 

Posted

Try setting up Construction Set Extender, CS/E for short found on Nexus and see if still happens.

 

I recommend the 5.xxx series, but others are now using 7.xxx too with good results. 

 

THANK YOU, THANK YOU, THANK YOU.  I spent hours searching the net for a solution to this.  It is finally working and CSE looks a lot better than CS. 

Posted

When you have the time look up LL member fejeena and one of their posts. They have a link or links at the bottom to most of the useful stuff when working with modded Oblivion.

 

When working with CS/E it will complain about integers (numbers) being used in edit IDs. Not a good practice (especially with mods that have scripts that call those resources) but many mod authors used them not knowing this.

 

You can use Wrye Bash to export those IDs out to a spreadsheet file and fix them; change numbers to letters. For example, if 000 change to aaa. Then import them back in, rinse and repeat for any others. (You only need to change the leading numbers to letters, not the ones in between or on the end.)

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...