IAmTheClayman Posted August 1, 2017 Posted August 1, 2017 I'm trying to do the following in a Papyrus fragment for a perk: Debug.MessageBox("Hello World") ;just as a test game.getPlayer().addItem(MeatBrahmin) However, this produces the following compilation error: "...\Fragments\Perks\PRKF__01000F9A.psc(8,25): variable MeatBrahmin is undefined". I know that in Papyrus you don't use the Form ID like you would in the in-game console, so what gives? This is exactly how the Creation Kit docs show to use addItem, but I can;t figure out why Papyrus is unhappy with that line
MissingMeshTV Posted August 1, 2017 Posted August 1, 2017 You haven't defined Brahmin Meat as a property so the fragment doesn't know what you are asking it to add: http://www.creationkit.com/index.php?title=Variables_and_Properties
IAmTheClayman Posted August 1, 2017 Author Posted August 1, 2017 (edited) You haven't defined Brahmin Meat as a property so the fragment doesn't know what you are asking it to add: http://www.creationkit.com/index.php?title=Variables_and_Properties I'm still confused though. How exactly should I set up a property for an item then? Edited August 1, 2017 by IAmTheClayman
kitcat81 Posted August 1, 2017 Posted August 1, 2017 Click on Properties and select "Create using a form". Type there "MeatBrahmin" . It should automatically create PMeatBrahmin ptoperty. Change your line to: game.getPlayer().addItem(PMeatBrahmin)Compile.
Recommended Posts