JPTR1 Posted September 13, 2022 Share Posted September 13, 2022 Hello, could someone check this script for me pls, it's not working. Function should be:If the "wooden Horn" is in players inventory, remove only this. If player doesn't have the wooden one, then the "golden Horn" should be removed.If player misses both horns, just the debug message. Scriptname MansionHornPlaceWoodOrGold extends ObjectReference ObjectReference Property OrbOfTeenhood AutoObjectReference Property Collision AutoMiscObject Property ItemWood AutoMiscObject Property ItemGold AutoEvent OnActivate(ObjectReference akActionRef)if Game.GetPlayer().GetItemCount(ItemWood) == 1) ->Line X1Game.GetPlayer().RemoveItem(ItemWood, 1, true)Debug.Notification("The Wooden Warhorn has been placed.")(GetLinkedRef() as ObjectReference).SetOpen(True)OrbOfTeenhood.enable()Collision.enable()elseif Game.GetPlayer().GetItemCount(ItemGold) == 1) ->Line X2Game.GetPlayer().RemoveItem(ItemGold, 1, true)Debug.Notification("The Golden Warhorn has been placed.")(GetLinkedRef() as ObjectReference).SetOpen(True)OrbOfTeenhood.enable()Collision.enable()elseDebug.Notification("A warhorn rack.")endifEndEvent Compile error in editor: LineX1, Col47: required (...)+ loop did not match anything at input ')'LineX2, Col51: required (...)+ loop did not match anything at input ')' Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 13, 2022 Share Posted September 13, 2022 You have an ')' at the end of each of those lines without a matching '(' at an earlier point. Base on what you have currently, either remove the ')' at the end or add a '(' at the beginning just after the 'if' and 'elseif'. Link to comment Share on other sites More sharing options...
JPTR1 Posted September 13, 2022 Author Share Posted September 13, 2022 Oh how embarrassing. That happens if you don't know what you do, and all your scripting skills are based on copying from one script to another....Thanks Ishara!! Link to comment Share on other sites More sharing options...
Recommended Posts