Jump to content

[Help] Custom race registration script won't compile - what is wrong?


Recommended Posts

Posted

I'm trying to register some custom creature races I made for a personal mod. I copied (more or less) the script from Sexy Nixy & Sexy Dwemmy, with appropriate mod and race name changes.

 

Here's the script:

 

Scriptname CaroWHRegisterCreatures extends Quest

SexLabFramework Property SexLab Auto

Event OnInit()
	Debug.Trace("[CaroWH] OnInit")
	InitializeRaces()
EndEvent

; Initialise (runs once)
Function InitializeRaces()
	Debug.Trace("[CaroWH] Initializing")
	; SexLab = Game.GetFormFromFile(0xD62, "SexLab.esm") as SexLabFramework
	if SexLab
		int slversion = SexLab.GetVersion()
		if slversion < 16000
			SexLab = none
		endif
	endif	
	
	if SexLab
		RegisterForModEvent("SexLabRegisterCreatureKey", "OnCreatureRegister")
		
		; If SL is already loaded up, won't get the register event... so call it directly.
		if sslCreatureAnimationSlots.HasRaceKey("SabreCats")
			OnCreatureRegister()
		else
			Debug.Trace("[CaroWH] SL creatures not yet registered")
		endif
	else
		Debug.Notification("Need SexLab 1.60 or higher for sexytimes")
		Debug.Trace("[CaroWH] Need SexLab 1.60 or higher for sexytimes")
	endif
EndFunction

;;;;;;;;;;;;;;;;;;;;
;  Callbacks 
;;;;;;;;;;;;;;;;;;;;

; Catch the SL creature register event and register our creatures if needed
Function OnCreatureRegister()
	Debug.Trace("[CaroWH] Creature Register")
	sslCreatureAnimationSlots.AddRaceID("Bears", "CaroWHreaturesBearBrownRace")
    sslCreatureAnimationSlots.AddRaceID("Bears", "CaroWHreaturesBearSnowRace")
    sslCreatureAnimationSlots.AddRaceID("Chaurus", "CaroWHreaturesChaurusRace")
    sslCreatureAnimationSlots.AddRaceID("ChaurusHunters", "CaroWHreaturesChaurusHunterRace")
    sslCreatureAnimationSlots.AddRaceID("DragonPriests", "CaroWHreaturesDragonPriestRace")
    sslCreatureAnimationSlots.AddRaceID("Dragons", "CaroWHreaturesDragonRace")
    sslCreatureAnimationSlots.AddRaceID("Draugrs", "CaroWHreatiresDraugrRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenBallistas", "CaroWHreaturesDwarvenBallistaRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenCenturions", "CaroWHreaturesDwarvenCenturionRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenSpheres", "CaroWHreaturesDwarvenSphereRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenSpiders", "CaroWHreaturesDwarvenSpiderRace")
    sslCreatureAnimationSlots.AddRaceID("Deers", "CaroWHreaturesElkRace")
    sslCreatureAnimationSlots.AddRaceID("Falmers", "CaroWHreaturesFalmerRace")
    sslCreatureAnimationSlots.AddRaceID("Gargoyles", "CaroWHreaturesGargoyleRace")
    sslCreatureAnimationSlots.AddRaceID("Gargoyles", "CaroWHreaturesGargoyleVariantRace")
    sslCreatureAnimationSlots.AddRaceID("Giants", "CaroWHreaturesGiantRace")
    sslCreatureAnimationSlots.AddRaceID("Horses", "CaroWHreaturesHorseRace")
    sslCreatureAnimationSlots.AddRaceID("Netches", "CaroWHreaturesNetchRace")
    sslCreatureAnimationSlots.AddRaceID("SabreCats", "CaroWHreaturesSabreCatRace")
    sslCreatureAnimationSlots.AddRaceID("SabreCats", "CaroWHreaturesSabreCatSnowyRace")
    sslCreatureAnimationSlots.AddRaceID("Seekers", "CaroWHreaturesSeekerRace")
    sslCreatureAnimationSlots.AddRaceID("Trolls", "CaroWHreaturesTrollRace")
    sslCreatureAnimationSlots.AddRaceID("Trolls", "CaroWHreaturesTrollFrostRace")
    sslCreatureAnimationSlots.AddRaceID("VampireLords", "CaroWHreaturesVampireBeastRace")
    sslCreatureAnimationSlots.AddRaceID("Werewolves", "CaroWHreaturesWerewolfBeastRace")
    sslCreatureAnimationSlots.AddRaceID("Wolves", "CaroWHreaturesWolfRace")
    sslCreatureAnimationSlots.AddRaceID("Canines", "CaroWHreaturesWolfRace")
EndFunction

It fails to compile with these errors:

 

Spoiler

Starting 1 compile threads for 1 files...
Compiling "CaroWHRegisterCreatures"...
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(306,31): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(306,42): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(307,19): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(307,30): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(312,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(312,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(313,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(313,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(722,31): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(722,42): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(723,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(723,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,61): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,72): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,91): cannot compare a none to a int (cast missing or types unrelated)
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,91): cannot relatively compare variables to None
No output generated for CaroWHRegisterCreatures, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on CaroWHRegisterCreatures

 

So...what am I doing wrong? I really don't understand any of this - I can only guess that one of these script files has the function that I'm calling in my script, but why would that affect it?

 

I admit, I know almost nothing about Papyrus, and I'm terrible at coding in general. I thought copying the script from Sexy Dwemmy would be fine, since it's not particularly old, but I have no idea.

 

EDIT: I've noticed '     ; SexLab = Game.GetFormFromFile(0xD62, "SexLab.esm") as SexLabFramework ' might be a problem, but it's commented out.

 

(To add, I've set up so that I'm not using MO, but I honestly don't know if I got the manual installs right on everything. The mods that I'm using (some are required for my mod, some are masters of those mods) are:

 

Spoiler

SexLab

ZaZ Animation Pack

Sisterhood of Dibella

USLEEP

SoS (Core ESM, ESP, and Muscular Addon)

SoS Carlos32 Horse addon

WiseMan 303's Flora Fixes (required by CACO)

CCOR

CACO

Clother & Clutter Fixes

Weapons and Armor Fixes Remade

Creature Framework

SexLab Aroused Redux

Pearl Juice Continued

More Nasty Critters (using the newest SLAL edition - 11.4H, I think?)

HCoS

BadDog's Hoodie Schlongs (ESM and ESP)

 

I followed the install guide for MNC and CreatureFramework by MadMansGun, but I wasn't sure where some of the other mods fitted into that. I'm not sure if that makes any difference though.)

  • 2 years later...
Posted
On 11/1/2018 at 8:54 AM, JustCaroAnon said:

I'm trying to register some custom creature races I made for a personal mod. I copied (more or less) the script from Sexy Nixy & Sexy Dwemmy, with appropriate mod and race name changes.

 

Here's the script:

 

Scriptname CaroWHRegisterCreatures extends Quest

SexLabFramework Property SexLab Auto

Event OnInit()
	Debug.Trace("[CaroWH] OnInit")
	InitializeRaces()
EndEvent

; Initialise (runs once)
Function InitializeRaces()
	Debug.Trace("[CaroWH] Initializing")
	; SexLab = Game.GetFormFromFile(0xD62, "SexLab.esm") as SexLabFramework
	if SexLab
		int slversion = SexLab.GetVersion()
		if slversion < 16000
			SexLab = none
		endif
	endif	
	
	if SexLab
		RegisterForModEvent("SexLabRegisterCreatureKey", "OnCreatureRegister")
		
		; If SL is already loaded up, won't get the register event... so call it directly.
		if sslCreatureAnimationSlots.HasRaceKey("SabreCats")
			OnCreatureRegister()
		else
			Debug.Trace("[CaroWH] SL creatures not yet registered")
		endif
	else
		Debug.Notification("Need SexLab 1.60 or higher for sexytimes")
		Debug.Trace("[CaroWH] Need SexLab 1.60 or higher for sexytimes")
	endif
EndFunction

;;;;;;;;;;;;;;;;;;;;
;  Callbacks 
;;;;;;;;;;;;;;;;;;;;

; Catch the SL creature register event and register our creatures if needed
Function OnCreatureRegister()
	Debug.Trace("[CaroWH] Creature Register")
	sslCreatureAnimationSlots.AddRaceID("Bears", "CaroWHreaturesBearBrownRace")
    sslCreatureAnimationSlots.AddRaceID("Bears", "CaroWHreaturesBearSnowRace")
    sslCreatureAnimationSlots.AddRaceID("Chaurus", "CaroWHreaturesChaurusRace")
    sslCreatureAnimationSlots.AddRaceID("ChaurusHunters", "CaroWHreaturesChaurusHunterRace")
    sslCreatureAnimationSlots.AddRaceID("DragonPriests", "CaroWHreaturesDragonPriestRace")
    sslCreatureAnimationSlots.AddRaceID("Dragons", "CaroWHreaturesDragonRace")
    sslCreatureAnimationSlots.AddRaceID("Draugrs", "CaroWHreatiresDraugrRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenBallistas", "CaroWHreaturesDwarvenBallistaRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenCenturions", "CaroWHreaturesDwarvenCenturionRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenSpheres", "CaroWHreaturesDwarvenSphereRace")
    sslCreatureAnimationSlots.AddRaceID("DwarvenSpiders", "CaroWHreaturesDwarvenSpiderRace")
    sslCreatureAnimationSlots.AddRaceID("Deers", "CaroWHreaturesElkRace")
    sslCreatureAnimationSlots.AddRaceID("Falmers", "CaroWHreaturesFalmerRace")
    sslCreatureAnimationSlots.AddRaceID("Gargoyles", "CaroWHreaturesGargoyleRace")
    sslCreatureAnimationSlots.AddRaceID("Gargoyles", "CaroWHreaturesGargoyleVariantRace")
    sslCreatureAnimationSlots.AddRaceID("Giants", "CaroWHreaturesGiantRace")
    sslCreatureAnimationSlots.AddRaceID("Horses", "CaroWHreaturesHorseRace")
    sslCreatureAnimationSlots.AddRaceID("Netches", "CaroWHreaturesNetchRace")
    sslCreatureAnimationSlots.AddRaceID("SabreCats", "CaroWHreaturesSabreCatRace")
    sslCreatureAnimationSlots.AddRaceID("SabreCats", "CaroWHreaturesSabreCatSnowyRace")
    sslCreatureAnimationSlots.AddRaceID("Seekers", "CaroWHreaturesSeekerRace")
    sslCreatureAnimationSlots.AddRaceID("Trolls", "CaroWHreaturesTrollRace")
    sslCreatureAnimationSlots.AddRaceID("Trolls", "CaroWHreaturesTrollFrostRace")
    sslCreatureAnimationSlots.AddRaceID("VampireLords", "CaroWHreaturesVampireBeastRace")
    sslCreatureAnimationSlots.AddRaceID("Werewolves", "CaroWHreaturesWerewolfBeastRace")
    sslCreatureAnimationSlots.AddRaceID("Wolves", "CaroWHreaturesWolfRace")
    sslCreatureAnimationSlots.AddRaceID("Canines", "CaroWHreaturesWolfRace")
EndFunction

It fails to compile with these errors:

 

  Hide contents

Starting 1 compile threads for 1 files...
Compiling "CaroWHRegisterCreatures"...
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(306,31): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(306,42): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(307,19): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(307,30): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(312,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(312,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(313,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(313,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(722,31): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(722,42): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(723,5): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslActorAlias.psc(723,16): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,61): variable NiOverride is undefined
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,72): none is not a known user-defined type
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,91): cannot compare a none to a int (cast missing or types unrelated)
E:\SteamLibrary\steamapps\common\skyrim\Data\Scripts\Source\sslSystemConfig.psc(765,91): cannot relatively compare variables to None
No output generated for CaroWHRegisterCreatures, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on CaroWHRegisterCreatures

 

So...what am I doing wrong? I really don't understand any of this - I can only guess that one of these script files has the function that I'm calling in my script, but why would that affect it?

 

I admit, I know almost nothing about Papyrus, and I'm terrible at coding in general. I thought copying the script from Sexy Dwemmy would be fine, since it's not particularly old, but I have no idea.

 

EDIT: I've noticed '     ; SexLab = Game.GetFormFromFile(0xD62, "SexLab.esm") as SexLabFramework ' might be a problem, but it's commented out.

 

(To add, I've set up so that I'm not using MO, but I honestly don't know if I got the manual installs right on everything. The mods that I'm using (some are required for my mod, some are masters of those mods) are:

 

  Reveal hidden contents

SexLab

ZaZ Animation Pack

Sisterhood of Dibella

USLEEP

SoS (Core ESM, ESP, and Muscular Addon)

SoS Carlos32 Horse addon

WiseMan 303's Flora Fixes (required by CACO)

CCOR

CACO

Clother & Clutter Fixes

Weapons and Armor Fixes Remade

Creature Framework

SexLab Aroused Redux

Pearl Juice Continued

More Nasty Critters (using the newest SLAL edition - 11.4H, I think?)

HCoS

BadDog's Hoodie Schlongs (ESM and ESP)

 

I followed the install guide for MNC and CreatureFramework by MadMansGun, but I wasn't sure where some of the other mods fitted into that. I'm not sure if that makes any difference though.)

 

This is way too late for you but I suspect you need the NiOverride source files.  When you find them, place them in data\source\scripts

I'm learning now and this is one of the issues I ran in to.  Not with registering custom races which is why I landed on this post but with doing something else.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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