Migration from version 0.5/0.6 to latest : Error level symbol def must be a function returning a component list #541
-
Hi, I am trying to make a little game with kaboom, In my version I am trying to use a newer version of kaboom, I have managed to use kaboom 0.6 but when I am trying to use the new version , ie if I'm replacing : <script src="https://kaboomjs.com/lib/0.6.0/kaboom.js"></script>by I have this error when the game is launching : Error level symbol def must be a function returning a component list Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Instead of 'x': [
sprite(),
pos(),
// other components..
] you should pass a function that returns the list of components 'x': () => [
sprite(),
pos(),
// other components..
] which is a shorthand for 'x': () => {
return [
sprite(),
pos(),
// other components..
]
} |
Beta Was this translation helpful? Give feedback.
Instead of
you should pass a function that returns the list of components
which is a shorthand for