Hi all...
So I am here with my tail between my legs as I can't even get the most basic of papyrus scripts to work even though I claim to be an excellent code writer. I find this so rudimentary, that i must apologize in advance for even having to ask this.
1) My first issue is that I cannot find a list of variable properties anywhere. The way I am learning them is by looking at random sample scripts, and that is very slow going. Is there a list anywhere? Although, it seems that the list may just be the object names from the object list in the CK. Is that it?
2) In the GECK days, I could use the menu bar in the CK to Edit -> Find Text -> and search existing scripts for pertinent examples of the functions I wanted to use. The scripts in Skyrim don't seem to be subject to the Find Text menu option. Is there another way to search through papyrus scripts?
3) Now to the nitty gritty...
I am trying to do something so simple; I have created a quest and quest script whose sole function is to check whether the player has a specific book that I created in his inventory. If he doesn't have it, I want to add it, but I can't even get past the inventory check. That's it. So I am trying to use the GetItemCount function like this where the name of the book form is MyBook:
Scriptname TestScript extends Quest ;Book Property fBook AutoEvent OnInit() ; This event will run once, when the script is initialized; fBook = MyBook; If (Game.GetPlayer().GetItemCount(MyBook)==0); EndifEndEvent
(Note: the semi colons were placed by me to indicate the lines that fail compiling. They are commented out for demonstration purposes only.)
I have added the book and the player as aliases to the quest, yet the lines with semi colons in front of them will not compile. I have tried explicit and implicit referencing for the GetItemCount parameter, both have failed compiling.
Bloody Heck, I say!