0

Anyone encountered this error when running yarn asb? I'm trying to compile an assemblyscript smart contract.

gitpod /workspace/MyAssemblyContract (main) $ yarn asb yarn run v1.22.17 $ /workspace/MyAssemblyContract/node_modules/.bin/asb ERROR TS1110: Type expected.

export function createGame() { ^ in assembly/index.ts(19,29)

/workspace/MyAssemblyContract/node_modules/asbuild/node_modules/yargs/build/lib/yargs.js:1132 throw err; ^

[1 parse error(s)] error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. gitpod /workspace/MyAssemblyContract (main) $

Ezra Kewa
  • 21
  • 2

1 Answers1

0

looks like you have not added a return type

please take an hour to read through 10-20 example contracts here https://github.com/learn-near so you can get an idea of basic syntax of AssemblyScript

amgando
  • 1,563
  • 8
  • 12