Sign in to follow this  
Followers 0
TigerCubofPNW

[SKY] Courier Question

So, following one tutorial I got nowhere. Using the data from the creation kit wiki, I made it work. However I had some CTD and looking at the log made me look again at the quest I'm using the courier with and while it compiled and did great before, now it's vomiting at me.

I am using the exact line of code from the instructions here: http://www.creationkit.com/Using_the_Vanilla_Courier
 

WICourierScript.additemtocontainer(alias_invitation.GetReference())

Yet CK keep throwing this at me: "cannot call the member function additemtocontainer alone or on a type, must call it on a variable"

That to me sounds like the property isn't filled, except that it is. Not sure what to do with that. Hopefully, someone here can tell me  The Pap log was filled with "cannot fill alias with a none object" about a thousand times, so I'm not sure if it's this or the other thing I'm about to post about.

 

0

Share this post


Link to post
Share on other sites

Actually, the wiki says the line

CourierScript.AddItemToContainer(Alias_YourNote.GetReference())

However, the first part, 'CourierScript' is whatever name you gave the property in your script. I have a feeling your shouldn't name your property the same as the script type which is WICourierScript.

(I'm no authority on scripting at all, just going by my interpretation of the wiki)

0

Share this post


Link to post
Share on other sites

Actually, the wiki says the line

 

However, the first part, 'CourierScript' is whatever name you gave the property in your script. I have a feeling your shouldn't name your property the same as the script type which is WICourierScript.

(I'm no authority on scripting at all, just going by my interpretation of the wiki)

No, I always use the same name as the name of the script when calling a function from that script and it never wigs out.

0

Share this post


Link to post
Share on other sites

Have you filled the note alias?

Yep. Or rather, the alias was filled automatically. Basically, at stage 0 of the quest, the above line is put into the Quest Stages fragment so that when the quest starts, the note will be added to the courier's inbox. I know the Quest Stages fragments are super sensitive and like to throw out errors and usually they go away but this one seems to persist. It's not, as I said, impairing the functionality of the quest. I'm just trying to figure out why my mod is of a sudden causing CTD and I don't know if this anomaly has anything to do with it.

0

Share this post


Link to post
Share on other sites

Upload your esp and I'll take a look at it. I know someone who's very knowledgeable about scripting, so if I can't figure it out, maybe she can.

0

Share this post


Link to post
Share on other sites

Upload your esp and I'll take a look at it. I know someone who's very knowledgeable about scripting, so if I can't figure it out, maybe she can.

That's a very kind offer! Unfortunately, that would involve you also having all the custom mods involved in this thing

Happily, I found the answers to two of my questions

1) The CK wiki does make mistakes

2) I'm an idiot. Even though I know this to be true, because I was blindly trusting the CK wiki I failed to remember get that in addition to the script, the call function line also needs the quest the script comes from. Here is how it is supposed to be written, for the class:

(WICourier as WICourierScript).additemtocontainer(alias_invitation.GetReference())

I haven't tested this in game to be sure this hasn't hosed the part of my quest where the courier comes to find me, but this was what was making the error.

Thanks for the input. It's helpful to have other people to talk to. Even if they shake their heads too and say, "Huh, well, it should work..."

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0