Jump to content

Oblivion CS scripting issue


Kevykxbox

Recommended Posts

Hey guys, Im in the progress of making my first major mod.

it's about 36 hours in and about 25% done.

 

Im now running into issues with my scripts, I have all the right syntax and such, but whenever I go to save my scripts they just sit there.

 

I will hit the save button on both the toolbar and file menu, and it wont show any errors. But the name of the file still stays blank, and when I exit the script Editor it says "Save current script? Current = "

 

I've restarted my CS (1.2) several times to no avail.

 

Here is my Script (after being proofread by people in chat, and still not compiling/saving)

 

scn HCA06script

 

begin Gamemode

 

addtopic HCAmorework

;the topic that starts the quest

 

if player.getincell HCAfortent == 1

; Once player gets in fort

if player.getstage HCA06 20 == 1

; and if the stage is 20 then:

player.setstage HCA06 30

endif

endif

 

if player.getincell HCAbandithideout == 1

;player gets into Bandit Hideout

;and has already decoded/found the letter

if player.getstage HCA06 40 == 1

;advance quest stage

player.setstage HCA06 45

endif

endif

 

end

 

I dont think it's a problem with my script, but if it is, please tell me how to fix it. Also, if it is a problem with my config (shouldn't be it's the default) let me know. Also my scripts have always saved in the past, so I am not aware what the problem is this time.

Edited by Kevykxbox
Link to comment
Share on other sites

Ok, now look at your script with proper indents, and tell me if you see a problem:

 

 

scn HCA06script

begin Gamemode

addtopic HCAmorework
;the topic that starts the quest

if
if
	player.getincell (HCAfortent) = 1
	; Once player gets in fort
	player.getstage HCA06 20 = 1
	; and if the stage is 20 then:
	setstage HCA06 30
endif
endif

if
if
	;player gets into Bandit Hideout
	player.getincell (HCAbandithideout) = 1
	;and has already decoded/found the letter
	player.getstage HCA06 40 = 1
	;advance quest stage
	setstage HCA06 45
endif
endif

end

 

 

A lesson learned yourself is a lesson least forgotten.

Link to comment
Share on other sites

Ok, now look at your script with proper indents, and tell me if you see a problem:

 

 

scn HCA06script

begin Gamemode

addtopic HCAmorework
;the topic that starts the quest

if
if
	player.getincell (HCAfortent) = 1
	; Once player gets in fort
	player.getstage HCA06 20 = 1
	; and if the stage is 20 then:
	setstage HCA06 30
endif
endif

if
if
	;player gets into Bandit Hideout
	player.getincell (HCAbandithideout) = 1
	;and has already decoded/found the letter
	player.getstage HCA06 40 = 1
	;advance quest stage
	setstage HCA06 45
endif
endif

end

 

 

A lesson learned yourself is a lesson least forgotten.

I forgot double ==.

 

After I changed that, still didnt work. SO I reinstalled CS and it worked right. for one script :/. if this keeps happeneding this mod is goign to take awhile

 

---EDIT----

Found the problem, due to one of the mods I downloaded. Whenever Oblivion exits the game. The addon/plugin menu process still runs and prevents CS from saving because it believes oblivion is running.

Edited by Kevykxbox
Link to comment
Share on other sites

Ok, now look at your script with proper indents, and tell me if you see a problem:

 

 

scn HCA06script

begin Gamemode

addtopic HCAmorework
;the topic that starts the quest

if
if
	player.getincell (HCAfortent) = 1
	; Once player gets in fort
	player.getstage HCA06 20 = 1
	; and if the stage is 20 then:
	setstage HCA06 30
endif
endif

if
if
	;player gets into Bandit Hideout
	player.getincell (HCAbandithideout) = 1
	;and has already decoded/found the letter
	player.getstage HCA06 40 = 1
	;advance quest stage
	setstage HCA06 45
endif
endif

end

 

 

A lesson learned yourself is a lesson least forgotten.

I forgot double ==.

 

After I changed that, still didnt work. SO I reinstalled CS and it worked right. for one script :/. if this keeps happeneding this mod is goign to take awhile

 

---EDIT----

Found the problem, due to one of the mods I downloaded. Whenever Oblivion exits the game. The addon/plugin menu process still runs and prevents CS from saving because it believes oblivion is running.

 

 

 

Now try this reworking of your script. Notice the difference?

 

 

scn HCA06script

begin Gamemode

addtopic HCAmorework

if ( player.getincell HCAfortent == 1 ) && ( getstage HCA06 >= 20 ) 
setstage HCA06 30
endif

if ( player.getincell HCAbandithideout == 1 ) && ( getstage HCA06 >= 40 )
   	setstage HCA06 45
endif

end

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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