TheTetrahedron Posted March 8, 2018 Author Share Posted March 8, 2018 Hello, thank you for your help, the formlist is working and for the items to get removed I just made an if elseif script. Link to comment Share on other sites More sharing options...
TheTetrahedron Posted March 18, 2018 Author Share Posted March 18, 2018 (edited) Hello, it's me again... Well, my little mod has a problem. I installed dawnguard and played a little bit. I realised the feed dialogue with my animal follower stopped working properly.I have no clue if dawnguard is the problem. I do not think so. I edited the skript a little bit and this caused it, in my opinion.So, what is wrong?Well, the mod stopped removing the meat from my inventory. Here is the skript: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname FeedCatSkript Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE If (Game.GetPlayer().GetItemCount(MammutRoh) > 0) Game.GetPlayer().RemoveItem(MammutRoh, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(MammutGebraten) > 0) Game.GetPlayer().RemoveItem(MammutGebraten, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(PferdRoh) > 0) Game.GetPlayer().RemoveItem(PferdRoh, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(PferdGebraten) > 0) Game.GetPlayer().RemoveItem(PferdGebraten, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(Wildbret) > 0) Game.GetPlayer().RemoveItem(Wildbret, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(WildbretGebraten) > 0) Game.GetPlayer().RemoveItem(WildbretGebraten, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(ZiegeRoh) > 0) Game.GetPlayer().RemoveItem(ZiegeRoh, 1) akspeaker.ModAV ("stamina", 1) ElseIf (Game.GetPlayer().GetItemCount(ZiegeGebraten) > 0) Game.GetPlayer().RemoveItem(ZiegeGebraten, 1) akspeaker.ModAV ("stamina", 1) EndIf ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Potion Property Wildbret Auto Potion Property WildbretGebraten Auto Potion Property PferdRoh Auto Potion Property PferdGebraten Auto Potion Property MammutRoh Auto Potion Property MammutGebraten Auto Potion Property ZiegeRoh Auto Potion Property ZiegeGebraten Auto Sorry for the German, its just the properties fur the different foods... Well, I have absolutly no clue, what I could do. The skript seems to be ok, the dialogue works like it should (Goodbye, only aviable after several hours, sound, etc...), but it wont remove the food. And of course I have some of it with me.I also tested it with only one food... Edited March 18, 2018 by TheTetrahedron Link to comment Share on other sites More sharing options...
JonathanOstrus Posted March 18, 2018 Share Posted March 18, 2018 (edited) Did you check to verify the properties on the script in CK are still actually filled? I had a problem where somehow I accidentally removed them in CK once. If that's not the case, have you checked the papyrus logs to see if it shows any errors when that topic fragment runs? And I know I said before using a while loop on a formlist could have an impact, but your list ispretty short. So rather than doing a messy tree like that you can shorten and reduce the chance for error like this: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname FeedCatSkript Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE Actor Player = Game.GetPlayer() int i = 0 int iSize = Foods.GetSize() while i < iSize Form testFood = Foods.GetAt(i) if (Player.GetItemCount(testFood) > 0) Player.RemoveItem(testFood, 1) akSpeaker.ModAv("Stamina", 1) return ; get out on first food match endif endwhile ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment FormList Property Foods Auto Edited March 18, 2018 by BigAndFlabby Link to comment Share on other sites More sharing options...
TheTetrahedron Posted March 19, 2018 Author Share Posted March 19, 2018 Hello BigAndFlabby, thank you for your help.I think, there are some broken code pierces floating around somewhere, causing problems. Is there a option to clean a mod and get rid of all those old unused skripts, etc? Otherwise I will redo the whole dialogue.Testing your skript :happy: Link to comment Share on other sites More sharing options...
Recommended Posts