Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ROBOTOO007 |
i basically used a line of code that I used in a python project in my godot project since the 2 languages are similar i thought it would work but for some reason it’s gving me an error can someone help me with this:
var map= [[EMPTY for x in range(0,map_size.x)] for y in range(0,map_size.y)]
GDScript does not support Python list comprehensions. You should read the GDScript documentation; if you don’t, you’ll keep running into problems thinking that things that work in Python should work in GDScript, too. There are actually huge differences between the two languages; GDScript is tiny compared to Python.
archeron | 2020-05-18 12:02