Jump to content

HasKeyword function


Manatee001

Recommended Posts

Im at the early stages of learning to use creation kit so please bear with me... Im trying to set up a simple quest involving some dialogue with an existing NPC.

When I try to compile the following script

"GetOwningQuest().SetObjectiveDisplayed(10)"

I get an error stating that

"C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\Location.psc(34,35): HasKeyword is not a function or does not exist".

The HasKeyword function seems to be defined in the Form.psc file (which I have in that folder alongside Location.psc") which contains the line "bool Function HasKeyword(Keyword akKeyword) native"

Is there another file I need to define the code that goes with this definition?

Link to comment
Share on other sites

  • 2 weeks later...

what exactly is happening on row 34 and column index of 35 on your script? You've given one line of code, no idea what row it is, and ...

GetOwningQuest().SetObjectiveDisplayed(10)

Seems to have nothing whatsoever to do this the error? Plus is just a fragment ? etc

 

My advice would be making sure the vanilla script are installed correctly and are being overwritten by SKSE correctly (if you have it installed) A simple mistake some people make is overriding SKSE scripts with Vanilla Scripts

 

post the whole script under a Spoiler Tag like so

 

 

 

ScriptName FormQScript extends Form
{ Author PeterMartyr }

Form[] Q
int capacity  = 128
int count = 0
int head = 0
int tail = -1

Event OnInit()
	Q = new Form[128]
EndEvent

Bool Function IsEmpty()
	Return count==0
EndFunction

Bool Function IsFull()
	Return count==capacity
EndFunction

Bool Function Remove()
	If !IsEmpty()
		Form akForm = Q[head]
		head += 1
		If head == capacity
			head = 0
		EndIf
		count -= 1
		Return akForm
	EndIf
	debug.trace(Self+" Remove() Underflow error")
	Return None
EndFunction

Function Add(form akForm)
	If !IsFull()
		If tail == capacity - 1
			tail = -1
		EndIf
		tail += 1
		Q[tail] = akForm
		count += 1
	Else
  		debug.trace(Self+" Add() Overflow Error")
	EndIf
EndFunction 

 

 

 

If you seriously expect help

Link to comment
Share on other sites

  • Recently Browsing   0 members

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