Unable to create resource (SOLVED)

Was almost done with the tut, finished step 8 and tried to run it, and I got this error. the window opens then closes again.
INFO:ENGINE: Defold Engine 1.2.78 (6b5b6a7)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device ‘default’

ERROR:SCRIPT: level/platform.script:11: attempt to index global ‘pos’ (a nil value)
stack traceback:
level/platform.script:11: in main chunk
WARNING:RESOURCE: Unable to create resource: build/default/level/platform.scriptc
WARNING:RESOURCE: Unable to create resource: build/default/level/platform.goc
WARNING:RESOURCE: Unable to create resource: build/default/main/main_generated_0_generated_0.factoryc
WARNING:RESOURCE: Unable to create resource: build/default/main/main_generated_0.goc
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /main/main_generated_0.goc.
WARNING:RESOURCE: Unable to create resource: build/default/main/main.collectionc
INFO:SOUND: Waiting for OpenAL device to complete

The error indicates that on line #11 of level/platform.script you try to use a variable named pos that isn’t defined. The platform.script should look as in Step 6 of the Getting Started tutorial.

2 Likes

Ahh fixed it yeah. Thanks for the help man!

3 Likes