diff --git a/docs/source/api/usertype.rst b/docs/source/api/usertype.rst index d714ee82..03aa394b 100644 --- a/docs/source/api/usertype.rst +++ b/docs/source/api/usertype.rst @@ -83,7 +83,7 @@ Note that here, because the C++ class is default-constructible, it will automati -- note the ":" that is there: this is mandatory for member function calls -- ":" means "pass self" in Lua local success = fwoosh:shoot() - local is_dead = fwoosh:hit(20) + local is_dead = fwoosh:hurt(20) -- check if it works print(is_dead) -- the ship is not dead at this point print(fwoosh.life .. "life left") -- 80 life left