- This topic has 5 replies, 2 voices, and was last updated 5 years, 1 month ago by Yuri Kovelenov.
-
AuthorPosts
-
2019-10-19 at 6:33 pm #20478GLiFTeKCustomer
Hi,
I’m getting this “TypeError: 0 is read-only”
console report while i’m trying to use a loop (any kind) to set a bunch of numbered list slots that are iterated (001,002,003 etc)
can’t find a way around this except to define each list slot separately and there are hundreds. (why i did the loops to assign them)if i change the loop’s count from 0-5 to 1-6 then the report says “TypeError: 1 is read-only”
EDIT i’ve found the exact spot that’s causing it.
it’s the “in list” field of the “set/insert” puzzle.
it doesn’t allow text(or create text with) puzzles for that slot, so i made a variable “list_name” be created from other items, then used that variable as the “in list” slot.it appears in the console as “[0]” and that’s what i’m getting the TypeError from.
if i use the actual list variable puzzle, it works fine.
so in conclusion i’m assuming it’s not possible now to make dynamic names for that slot? (even though they’d already been initialized?is this a bug in the puzzles?
i’ve never come across it before while doing similar things.thanks
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2019-10-20 at 9:48 am #20486Yuri KovelenovStaffHi,
the lists are indexed using numeric indices starting from 0 (this is basically JavaScript’s Array). If you want non-numeric keys, use Dictionaries instead.
https://www.soft8soft.com/docs/manual/en/puzzles/Dictionaries.html2019-10-21 at 3:03 am #20499GLiFTeKCustomerHi,
the lists are indexed using numeric indices starting from 0 (this is basically JavaScript’s Array). If you want non-numeric keys, use Dictionaries instead. https://www.soft8soft.com/docs/manual/en/puzzles/Dictionaries.htmlhmm.. right i understand that difference, but the issue is the NAME of the list / dictionary.. that i can’t use a “create text with” or variable to designate multiple iterations of ONE name ie: list_500, list_501, list_502 etc..
just trying to change property fields for identical iterations of the same list.
this is for many objects that have 6 properties each. but each object is loaded in with it’s own distinct object Id number that goes in front of every field/key property.it’s the “in LIST” or “in DICTIONARY” slot of those puzzles.. the ID name of the array or object..
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2019-10-21 at 5:43 am #20501Yuri KovelenovStaff2019-10-26 at 10:24 pm #20726GLiFTeKCustomerthe issue was solved using the “variable value by name” puzzle in the Misc section of the puzzles.
this tiny puzzle saved me pages of redundancy.
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2019-10-27 at 9:44 am #20727Yuri KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.