Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Making Rooms Rentable


HeffsMods
 Share

Recommended Posts

Hey, i'm trying to get the people in my inn to allow me to rent a room. But every time i try and save this script, it comes up with the message

Script 'Publican_KzuranGeneral', line17:

Script command '111KzuranMissingSomethingRentDoor.unlock' not found

i was wondering if anyone could help me.

I've set the door as a persistent reference, as with the bed (after follwing this article: http://cs.elderscrolls.com/constwiki/index.php/Rent_A_Room_Tutorial,, but it still hasn't worked)

here's my script;

Scriptname Publican_KzuranGeneral


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

		111KzuranMissingSomethingRentDoor.unlock	

		111KzuranMissingSomethingRentBed.SetOwnership


	else


		if ( GameDay != rentday )

			set cleanup to 1

		elseif ( GameMonth != rentmonth )

			set cleanup to 1

		endif

	endif


	If ( Player.GetInCell 1KzuranLowerGeneralShop == 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

			111KzuranMissingSomethingRentDoor.SetOpenState 0

			111KzuranMissingSomethingRentDoor.lock 30

			111KzuranMissingSomethingRentBed.SetOwnership 111KzuranMissingSomethingPublican

		endif

	endif

endif



End

Link to comment
Share on other sites

Mainly, you CANNOT start a reference name with a number. The reference name when used in a script, if it has a number as the first character, is assumed to represent the 'form Id' and not the actual name.

That is why it will not 'find' your reference name.

Its best to never use a number as the first character of any object you create. There are other instances where it will cause you problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...