I suppose you already read about Dictionaries here?:
I propose that you access Dictionaries elements with [].
var dia = {"scene1": {"row1":{"someid":12, "text": "hi there"},"row2":{}},"scene2":{}}
print("text contents: " + dia["scene"+str(global.scene)]["row1"]["text"]))
Edit and another example:
var six = "scene"+str(global.scene)
if dia.has(six):
var s = dia[six]
print(s["row1"]["text"])
else:
print("index '"+six+"' unknown in dia")
Thx for the response. Its been a while. (25jears) last time i programed (turbo pascal)
the first probpose gave out the same error that i was dealing with before:. expected end of statement after expression in the print line around this position [“text”]))
(why?)
but the second example worked. Thank you!
DIenve | 2019-05-24 09:04
ah ok there was a ) to much at the end!
thx
DIenve | 2019-05-24 09:13
Yes turbo pascal. Skipped the CP/M version (and UCSD-Pascal) and began with it on MS-DOS. Uh, getting off topic.
wombatstampede | 2019-05-24 09:30
wow CP/M nice. Childhood memorys of my c128.
Just wanted to thank you again. Im realy happy to be able to continiue. The helped alot. Sometimes you stand in the tub (i hope my english was correct)