fork download
  1. # your code goes hereextends Node2D
  2. var map=[[0,1,2,3],[4,5,6,7],[8,9,10,11],[11,12,13,14]]
  3. var spriteload = preload("res://levels/Sprite.tscn")
  4. var blanklist=[]
  5. # Called when the node enters the scene tree for the first time.
  6. func _ready():
  7. for n in range(16):
  8. blanklist.append(spriteload.instance())
  9. blanklist[n].set_frame(n)#何番目のフレームを入れるか番号を表示
  10. add_child(blanklist[n])
  11. for y in range(4):
  12. print(map[y].find(n))
  13. if map[y].find(n) != -1:#スプライトのリストの中からnがみつかったら
  14. blanklist[n].set_position(Vector2(map[y].find(n)*100, y*100))
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.5/py_compile.py", line 125, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "./prog.py", line 2
    var map=[[0,1,2,3],[4,5,6,7],[8,9,10,11],[11,12,13,14]]
          ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/py_compile.py", line 129, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 2
    var map=[[0,1,2,3],[4,5,6,7],[8,9,10,11],[11,12,13,14]]
          ^
SyntaxError: invalid syntax

stdout
Standard output is empty