Scripting Trouble! Please Help!

Post » Wed Sep 26, 2012 9:53 pm

Ok, I am trying to create an inn, I have the in itself done and the NPC is created complete with AI. My issue is with the scripting, the script seems to be perfect, except that when I try to save it, I get the following error:

Item "MyInnCell" not found for parameter cell. Compiled script not saved

This is the line in the script it is referring to:

If ( Player.GetInCell SCSmugglersHollowIntSCSmugglersHollowInn == 0 )

I should point out that the inn building is inside a cave, so you have to go through the cave to get to the inn. If anybody can help me, I would greatly appreciate it!

Here is the full script, just in case:


Scriptname Publican SmugglersHollowInnKavan




short rent
short rentday
short rentmonth
short cleanup
short setup




begin gamemode


if ( rent == 1 )

if ( setup == 0 )
set rentday to GameDay
set rentmonth to GameMonth
set setup to 1
SCKavanRentDoorREF.UnLock
SCKavanRentBedREF.SetOwnership

else

if ( GameDay != rentday )
set cleanup to 1
elseif ( GameMonth != rentmonth )
set cleanup to 1
endif
endif

If ( Player.GetInCell SCSmugglersHollowIntSCSmugglersHollowInn == 0 )
if ( Cleanup == 1 )
Set Cleanup to 2
endif
endif

if ( Cleanup == 2 )

set rent to 0
set setup to 0
set rentday to 0
set rentmonth to 0
set cleanup to 0
SCKavanRentDoorREF.SetOpenState 0
SCKavanRentDoorREF.Lock 30
SCKavanRentBedREF.SetOwnership Sthasa
endif
endif


End
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Wed Sep 26, 2012 10:11 pm

Are you sure the interior is called SCSmugglersHollowIntSCSmugglersHollowInn? That looks like you duplicated the name a bit there. It doesn't matter that the Inn is inside a cave, you just use the Editor ID of the interior cell you are testing for.
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm


Return to IV - Oblivion