Jump to content

[LE] New to modding Skyrim, can't compile someone else's script - compiler error?


Recommended Posts

Background: Having never done it before, I decided to try and get my feet wet with Papyrus by fixing some minor annoyances in cpuLL's Myopia mod. Specifically, I wanted to cause the glasses to return to the inventory when dropped instead of falling on the floor and usually disappearing from the game forever - so the only change I needed to make was to comment out a single line of code and recompile. (I'd like to play around with adding things to its formlist too, but one problem at a time...)

 

Here's the script, which is obviously cpuLL's work and not mine:

 

  Reveal hidden contents

 

 

 

Several hours later...

C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(52,12): GetModByName is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(52,12): cannot call the member function GetModByName alone or on a type, must call it on a variable
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(52,42): cannot compare a none to a int (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(85,12): GetModByName is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(85,12): cannot call the member function GetModByName alone or on a type, must call it on a variable
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(85,56): cannot compare a none to a int (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\source\scripts\myopiaPlayerAlias.psc(101,45): getName is not a function or does not exist
No output generated for myopiaPlayerAlias.psc, compilation failed.

I have already fixed the compiler's folder locations and extracted my Scripts.zip (hence why we're down to three errors), but I can't seem to get the compiler to recognise these fuctions. Tried changing GetModByName to IsPluginInstalled, as I couldn't find the former on the Creation Kit wiki (and, again, this is my first ever Papyrus scripting attempt), but that throws the same error.

 

As I'm so new to this, I'm genuinely not sure if the problem is the code or the compiler, but I'm leaning towards the compiler. Having already extracted all my source scripts, though... how can I fix it?

Edited by AdmiralAlbia
Link to comment
Share on other sites

Mm, I suspected it might be... thing is, SKSE is installed and its sources are unpacked. And as I said, I changed the lines to IsPluginInstalled (a native function), and got the same 'not a function or does not exist' error. Also, I have to assume that getName is native?

Link to comment
Share on other sites

GetName is also SKSE

 

Double check and make sure that you placed the SKSE PSC files in the same location as those from the scripts.rar file. Also, if you extracted the scripts.rar file after having installed SKSE, it will have overwritten the SKSE PSC files. Should that be the case, re-install them.

 

To know if you have the correct files in place:

Locate Form.psc and look for the function GetName

Locate Game.psc and look for the function GetModName

If they are not on those scripts, you do not have the correct files in place.

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

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