Jump to content

Scripting Error? Strange "integers"


jaghar7

Recommended Posts

I don't even know where to begin diagnosing this...

 

The fragment that starts it all...

 

Debug.Notification("Bee and Barb")
TravelQuestScript.MeetAtInn(6)
The function called..
Function MeetAtInn(int x)
	Debug.Notification("Meet at.." + x)
	Actor Follower = MapMarker as Actor

	Debug.Trace("!Bowen Meet At: Location ID: " + x)
	BB_ClearSchedule()
	AtLocation.SetValue(x)
	BB_SetSchedule()
	CanGoAhead.SetValue(3)
	FollowerPackage.Clear()
	Follower.EvaluatePackage()
	Debug.Notification("Bowen is going on ahead...")
endFunction

The resulting papyrus log...

 

[01/21/2022 - 05:51:16PM] !Bowen Meet At: Location ID: 22883.541016

 

 

How in the name of all that's <fill in your favorite whatever> does it get from 6 to 22883.541016 ??? What the _____!?!?!?

 

I thought the last two issues I had were WEird! Does anyone have any clue at all what is causing this?

Edited by jaghar7
Link to comment
Share on other sites

Update: No takers so far huh? 3 unexplained phenomenon in as many days. One might wonder why the same *bleep* can happen to the same guy thrice?

 

Anyhow, Solution: renamed the integer from x to LocIndex and suddenly it's back to working perfectly. Go figure. Take away? um.. if in doubt, give your variables proper names?

 

Thankfully, I have no new code planned before initial release. On to appearance and VA and here's hoping to not end up befuddled enough to compel a new "what the flipping hell????" forum post. :)

Link to comment
Share on other sites

As Sphered already mentioned: What ever you do, do never use x, y or z as variable or property names within scripts of type objectreference!

 

Its caused by vanilla script "ObjectReference.psc", so the papyrus compiler handles x as self.X etc.

 

 

Scriptname ObjectReference extends Form Hidden

; Property to obtain the current X position of the object
float Property X
  float Function get()
    return GetPositionX()
  EndFunction
EndProperty

; Property to obtain the current Y position of the object
float Property Y
  float Function get()
    return GetPositionY()
  EndFunction
EndProperty

; Property to obtain the current Z position of the object
float Property Z
  float Function get()
    return GetPositionZ()
  EndFunction
EndProperty

 

 

Edited by ReDragon2013
Link to comment
Share on other sites

  • Recently Browsing   0 members

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