Opened 7 years ago

Closed 7 years ago

#43 closed enhancement (fixed)

lua selectlayer return nil if layer/frame not exist or function that gives last layer/frame

Reported by: HoraK-FDF Owned by: pulkomandy
Priority: major Milestone: 2.5
Component: GrafX2 Version: 2.5
Keywords: Cc:

Description

Hi,

i was trying to write a little script for animated pictures to export as tiles useable for GBA sprite programming but selectlayer makes GrafX2 throw an error so it would be only possible to make such script with an inputbox where i must put the lastnumber-1 in. But to make an fully automated script it would be nice if selectlayer returns nil if the frame/layer does not exist or another function that gets the last layer/frame (getlastlayer maybe) that then can be used to set the end of the loop.

Change History (4)

comment:1 by HoraK-FDF, 7 years ago

by thinking over it it would be the best to have booth the nil value for while and until style loops and the getlastlayer (or so) for for style loops.

And should i make a new ticket for that there should be an selectlayer for the spare page aswell or is this ok here?

comment:2 by pulkomandy, 7 years ago

Let's keep it here, it should be very similar code for both.

comment:3 by pulkomandy, 7 years ago

Fixed in r2171.

comment:4 by pulkomandy, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.