Jump to content

[LE] Script bugs


Recommended Posts

Good time of day, I keep messing around with my religion mod, and this time I have a problem with the quest scripts

 

The first script keeps throwing an error when compiling and the most interesting thing is that this error is all the lines in the script. I've already racked my brains, I just don't know what the f*** it wants. I tried to install the new version of CK but it shows the startup screen and just freezes, I guess it won't give me anything either.

 

 

 

The second script compiles as it should, but during the quest it does not count the necessary items and does not display them in the stage on the screen (there you need to calculate the amount of chicken meat)

 

 

Scriptname CybertismChurchQuestPlayerScript extends ReferenceAlias
Quest Property pFFR0401Quest Auto
Potion Property pFoodChicken Auto
CybertismChurchQuestScript Property pFFR0401QuestScript Auto Conditional
Event OnInit()
AddInventoryEventFilter(pFoodChicken)
endEvent
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
if pFFR0401Quest.GetStageDone(10) == 1
if pFFR0401Quest.GetStageDone(15) == 0
if akBaseItem == pFoodChicken
pFFR0401QuestScript.ChickenMeatCount()
endif
endif
endif
endEvent
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
if pFFR0401Quest.GetStageDone(10) == 1
if pFFR0401Quest.GetStageDone(15) == 0
if akBaseItem == pFoodChicken
pFFR0401QuestScript.ChickenMeatCount()
endif
endif
endif
endEvent
Scriptname CybertismChurchQuestScript extends Quest
GlobalVariable Property FFR18ChickenMeatCount Auto Conditional
Quest Property pFFR0401Quest Auto Conditional
Potion Property pFoodChicken Auto Conditional
Function ChickenMeatCount()
float CurrentCount = Game.GetPlayer().GetItemCount(pFoodChicken)
FFR18ChickenMeatCount.Value = CurrentCount
UpdateCurrentInstanceGlobal(FFR18ChickenMeatCount)
if CurrentCount >= 3
pFFR0401Quest.SetObjectiveCompleted(10,1)
pFFR0401Quest.SetObjectiveDisplayed(15,true,true)
elseif CurrentCount < 3
pFFR0401Quest.SetObjectiveCompleted(10,0)
pFFR0401Quest.SetObjectiveDisplayed(15,0)
pFFR0401Quest.SetObjectiveDisplayed(10,true,true)
endif
endFunction

 

I would be glad and grateful for any help, as I can't figure it out for a long time and my whole work has stopped because of it

Link to comment
Share on other sites

Make sure you have the source scripts (PSC files) extracted and in the correct location for the Creation Kit to find them. If you have not modified the INI files to look in a different folder, simply extracting the scripts.rar / scripts.zip file (depending on LE or SE) in the current location (Data folder) then you should be good.

Link to comment
Share on other sites

Thanks for the answer, but unfortunately your way did not help at all, the scripts.rar file I have long ago extracted, I have not modified the INI file in any way, but it simply doesn't work or maybe I'm too dumb even though I've been working with this program for more than a year.

I compile all other scripts except this one

Link to comment
Share on other sites

  • 5 months later...

I could see Papyrus having a fit with an underscore placed at the beginning of the script name. It doesn't like numbers there either. I can tell you from experience that there is no issue with underscores in the middle of the script name. i.e. abim_IMS_PlayerScript

Link to comment
Share on other sites

  • Recently Browsing   0 members

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