【发布时间】:2015-09-10 21:14:29
【问题描述】:
我有以下 yaml 文件:
Pantalla:
ancho: 640
alto: 480
Configuracion:
vel_personaje: 3
merge_scroll: 30
Tipos:
- nombre: arbol
imagen: img/tree
ancho_base: 2
alto_base: 2
pixel_ref_x: 30
pixel_ref_y: 40
fps: 10
delay: 5
- nombre: casa
imagen: img/house
- nombre: auto
imagen: img/car
ancho_base: 5
alto_base: 5
Escenario:
- nombre: principal
size_x: 100
size_y: 100
entidades:
- {x: 10, y: 15, tipo: tierra}
- {x: 15, y: 20, tipo: tierra}
- {x: 10, y: 15, tipo: agua}
- {x: 30, y: 55, tipo: castillo}
protagonista:
- tipo: principal
x: 50
y: 50
当我尝试阅读不同的“entidades”时,yaml-cpp 会显示以下内容:
在抛出 'YAML::ParserException' 实例后调用终止 what(): yaml-cpp: error at line 32, column 25: 非法映射值
第 32 行第 25 列就在“y:”之后。我不知道我做错了。感谢您的帮助!
【问题讨论】: