Jump to content

[Solved] Papyrus compiler and F4SE don't play nice. How to get to work?


Recommended Posts

Posted

Hi!

 

I have just reinstalled my Fallout 4 and Creation Kit on a new computer, and now I can't compile scripts any more. They compile just fine for vanilla code but if I use F4SE code it can't compile.

The scripts use VarToVarArray function from F4SE but I just get the following error:

 

VarToVarArray is not a function or does not exist
cannot call the member function VarToVarArray alone or on a type, must call it on a variable
cannot cast a void to a actor[], types are incompatible

 

It's the first error that is the main one, the other two is just follow up errors to the first one.

I have setup CK, Notepad++, VS Code and even Sublime Text to compile every one come up with the same error, I can't figure out how to get it to work.

It used to be that you did have to launch CK via F4SE_launcher by adding -editor. But that don't work any more. So here I stand at my wits end.

 

Can a nice person please give me instructions or point me in the right direction?

 

Regards

  OokamiChan

Posted
On 1/29/2023 at 6:08 PM, MichellChan said:

Hi!

 

I have just reinstalled my Fallout 4 and Creation Kit on a new computer, and now I can't compile scripts any more. They compile just fine for vanilla code but if I use F4SE code it can't compile.

The scripts use VarToVarArray function from F4SE but I just get the following error:

 

VarToVarArray is not a function or does not exist
cannot call the member function VarToVarArray alone or on a type, must call it on a variable
cannot cast a void to a actor[], types are incompatible

 

It's the first error that is the main one, the other two is just follow up errors to the first one.

I have setup CK, Notepad++, VS Code and even Sublime Text to compile every one come up with the same error, I can't figure out how to get it to work.

It used to be that you did have to launch CK via F4SE_launcher by adding -editor. But that don't work any more. So here I stand at my wits end.

 

Can a nice person please give me instructions or point me in the right direction?

 

Regards

  OokamiChan

 

How did you install F4SE?

Do you have its papyrus source files in your .../Data/Scripts/Source/ directory (and the pex files in Scripts)?

Does your editor already show you that the F4SE functions don't exist or does only the compiler complain?

How do you run the compiler?

Are you aware that VarToVarArray is in Utility (so you either have to import Utility or call Utility.VarToVarArray)?

Posted
18 hours ago, LenAnderson said:

How did you install F4SE?

 

The same way as I always do copy every thing in F4SE zip file to root folder of Fallout 4.

 

 

Do you have its papyrus source files in your .../Data/Scripts/Source/ directory (and the pex files in Scripts)?

 

I would say off course, but this got me thinking.

 

 

Does your editor already show you that the F4SE functions don't exist or does only the compiler complain?

 

This relay got me thinking, first Notepad++ (Is my main work area), nope, no information that I needed.
Then VS Code, there I could see all the imported files, and it showed the original utility.psc file, NOT F4SE utility.psc file.
But it also said it was in base folder. After a quick check and it was there, unmodded version.

The F4SE psc files went to source folder, NOT source\base folder, where the original file is.

 

After moving the files to the correct folder all is well, I can now compile normally.

 

I checked my old F4SE file (v0.6.21) and did see that the psc files when to source\user folder.

It seams that bethesta when they moved CK from bethesta.net to steam they also moved some of the files from source\user folder to source\base folder.

 

I do thank you for good suport, by pointing me in the right direction.

Thank you!

 

Kind regards

  OokamiChan

  • 9 months later...
Posted

I am stumbling over an issue which looks like the same problem that MichellChan encountered.

 

Specifically, I am getting the error "LogicalAnd is not a function or does not exist"

 

So it sounds like I need to fix the location of Math in my F4SE installation.

 

But this leads me to questions:

  1. Is this issue documented anywhere? It seems like other people would also have problems with it.
  2. Does Creation Kit need the .psc file to be in Base or the .pex file or both?
  3. Does anything need the Math.psc or Math.pex in either of their respective folders?
  4. Does anything get confused if I leave a copy of either file in the distributed F4SE folders?

I can figure out some of this by experimenting, but ... surely someone else has already figured this out? (I have not yet found any such documentation.)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...