Jump to content

[Scripting] How come this function does not return a value?


Nexussux!

Recommended Posts

Posted

Here's a small script whose purpose is to return an animation list from sexlab:

 

Scriptname AnimationPlayerControl extends Quest  

SexLabFramework Property SexLab Auto


function getAnimationsBJ() ;Gets only bj animations from sexlab/slal


    sslBaseAnimation[] anims
    anims = SexLab.GetAnimationsByTag(2, "Blowjob",tagSuppress="Fisting") ;Get all bj animations


	return anims	;Return the list of animations. The compiler fails here

endFunction

 

 

Whenever it is compiled,  it fails with "cannot return a sslbaseanimation[] from getanimationsbj, the function does not return a value" error. Feels like a rookie mistake somewhere, but where exactly?

 

 

 

 

Posted
Scriptname AnimationPlayerControl extends Quest  

SexLabFramework Property SexLab Auto

sslBaseAnimation[] function getAnimationsBJ() ;Gets only bj animations from sexlab/slal
  sslBaseAnimation[] anims
  anims = SexLab.GetAnimationsByTag(2, "Blowjob",tagSuppress="Fisting") ;Get all bj animations
  return anims	;Return the list of animations. The compiler fails here
endFunction
Posted

You have to specify the return value type if you want to return a value

Posted
17 hours ago, CPU said:

You have to specify the return value type if you want to return a value

 

DAMN. This is what I get for getting WAY too used to syntax highlight. Thanks and sorry for the obvious derp question.

Archived

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

  • Recently Browsing   0 members

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