The go object isn't recognized (SOLVED)

Hi!
I’m just starting to learn Defold.

First I tried to show an image on screen.

  1. I put a png file in the “main” folder
  2. I created an atlas and added a new image with the png reference to it
  3. I created a game object in the main.collection
  4. I attached a sprite component to it
  5. I referenced the atlas and the image to the sprite
  6. It showed the image when I build the game.

Then I moved the game object (not the sprite position but its parent game object) away from the origin.

Now I’m trying to put back by code a game object at the origin of the main.collection.
I tried this but it didn’t worked :
I created a script and attached it as a file component to the sprite’s game object.

function init(self)
	self.zero_vector = vmath.vector3()
	go.set_postion(self.zero_vector)
end

So I tried to use the update function to do it :

function update(self, dt)
	-- Add update code here
	-- Remove this function if not needed
	go.set_postion(self.zero_vector)
end

It also didn’t worked.
The error message is as follows :
attempt to call field ‘set_postion’ (a nil value)
I suppose it’s because the go object isn’t recognized.
Am I missing something?
Also, is there a chat community like Discord or irc for Defold?

It’s misspelled. It’s supposed to be go.set_position()

The error message tells you that it only found a nilvalue called set_postion.
In Lua, undefined variables are evaluated as nil.

Yes, we have a slack channel here

Thanks! I didn’t caught my misspelling!