godotengine / godotengine/godot-docs
debugger error first_3d_game/09.adding_animations.rst
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
Godot Engine v4.3.stable.mono.official.77dcf97d8
**Issue description:**
At the final step of the [Your first 3D game](https://docs.godotengine.org/en/stable/getting_started/first_3d_game/index.html) guide, the finished game outputs a debug error:
```console
Warning: Integer division, decimal part will be discarded.
INTEGER_DIVISION
mob.gd:31
```
**As a result of** [this](https://docs.godotengine.org/en/stable/getting_started/first_3d_game/09.adding_animations.html#codecell4) **code:**
```gdscript
func initialize(start_position, player_position):
#...
$AnimationPlayer.speed_scale = random_speed / min_speed
```
**URL to the documentation page (if already existing):**
https://docs.godotengine.org/en/stable/getting_started/first_3d_game/09.adding_animations.html#codecell4
**Solution:**
In ``mob.gd``, replace:
```gdscript
# Minimum speed of the mob in meters per second.
@export var min_speed = 10
# Maximum speed of the mob in meters per second.
@export var max_speed = 18
```
With:
```gdscript
# Minimum speed of the mob in meters per second.
@export var min_speed = 10.0
# Maximum speed of the mob in meters per second.
@export var max_speed = 18.0
```
I've opened this as an issue because I don't know if this is the correct way of resolving this error
...or if it even needs fixing(?)
Looking forward to learn about this :) It's my first time using godot
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.