Jump to content

Emitter:SetMaxScale() documentation is ambiguous


Recommended Posts

Using this page https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Emitter_SetMaxScale

It isn't clear how many arguments this Lua function accepts. Syntax section states 1 argument

Quote

Syntax

  • SetMaxScale(number maxscale)

But the example has 2 arguments

if (window:KeyDown(Key.Up)) then
        maxscale = maxscale + 1
        emitter:SetMaxScale(maxscale,maxscale) 
    elseif (window:KeyDown(Key.Down) and maxscale > 0) then
        maxscale = maxscale -1  
        emitter:SetMaxScale(maxscale,maxscale) 
    end

The C++ documentation is consistent in that there is a single argument. However the header file "Emitter.h" has two functions listed

virtual void SetMaxScale(const float x);//lua
virtual void SetMaxScale(const float x, const float y);//lua

Seems like both Lua and C++ have 1 and 2 arguments variations but only the 1 argument variant is documented and Lua example shows 2 arguments.

  • Thanks 2
Link to comment
Share on other sites

  • 7 months later...
  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...