[RESOLVED] display.newPolygon Not Working

Hi guys,

I am trying out the newPolygon in storyboard, and i am constantly getting a windows-simulator build error. Am I missing something, like a plugin in build.settings ?

I am trying out the sample code in the document, and stops at “display.newPolygon” with an error :

… attempt to call field ‘newPolygon’ (a nil value)

stack traceback:

        [C]: in function 'newPolygon’

local halfW = display.contentWidth\*0.5; local halfH = display.contentHeight\*0.5; local vertices = { 0,-110, 27,-35, 105,-35, 43,16, 65,90, 0,45, -65,90, -43,15, -105,-35, -27,-35, } local o = display.newPolygon( halfW, halfH, vertices ) -- o.fill = { type="image", filename="aquariumbackgroundIPhone.jpg" } o.strokeWidth = 10 o:setStrokeColor( 0, 255, 255 )

Works fine for me in G2.0 daily build 2013.2021. Which build are you using?

Sorry, i just notice there is a different daily-build for Graphics 2.0

I was using build 1244. I just downloaded 2021 and it is working. Thanks

Any chance we can mark threads like this as resolved so as to not give the wrong impression, and to help out people who might have the same problem in the future?

Done :slight_smile:

Works fine for me in G2.0 daily build 2013.2021. Which build are you using?

Sorry, i just notice there is a different daily-build for Graphics 2.0

I was using build 1244. I just downloaded 2021 and it is working. Thanks

Any chance we can mark threads like this as resolved so as to not give the wrong impression, and to help out people who might have the same problem in the future?

Done :slight_smile: