1
Extensions / Re: 2D List Extension
« on: July 18, 2017, 11:39:58 am »How do I fix the following error?
/My Stuff/stencylworks/engine-extensions/2DList/List2D.hx:70: characters 10-14 : On static platforms, null can't be used as basic type Float
I'm getting the same error when trying to "Set GameAttributeListName to <generate new 2D list etc>". Feels like I'm missing something obvious, but not sure what. Clueless noob. Any help is appreciated.
I'm having the same error too. I'm a programming noob so any help would be great. Thanks
I had this same issue, and SadiQ's answer in this thread on March 1, 2014 worked (quoted below). It does automatically populate the 2DList with 0s, so if 0 is an expected possible value (e.g., you need a discrete null and 0 value for your use case), you might need to adjust the rest of your blocks to compensate.
Here are the steps I took:
In the Stencyl menu, select Debug > View > View Workspace Folder. In that folder, open stencylworks > engine-extensions > 2DList and open the file List2D.hx in a code editor like Sublime Text. On lines 20 and 70, replace null with 0.
I had to replace list_column = [for(x in 0...r_amount) null]; with list_column = [for(x in 0...r_amount) 0]; and I had to return 0 in the get_entry function to get it to work for me.
Having a populate list block would be better in case somebody actually needs 0 in their values and would like to populate the list with something like -1.