godotengine / godotengine/godot
GridMap const InvalidCellItem Datatyp wrong in C#
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- tested Godot v4.4.stable.mono
### System information
Godot v4.4.stable.mono
### Issue description
const GridMap.InvalidCellItem is type long (-1L) but its only used for GetCellItem and SetCellItem (see [docs](https://docs.godotengine.org/en/stable/classes/class_gridmap.html#class-gridmap-constant-invalid-cell-item))
The return value for GetCellItem is Int and the expected parameter SetCellItem is also Int but InvalidCellItem is Long so you always have to cast.
### Steps to reproduce
Error:
```c#
gridMap.SetCellItem(cellPos, GridMap.InvalidCellItem)
```
Works:
```c#
gridMap.SetCellItem(cellPos, (int)GridMap.InvalidCellItem);
```
### Minimal reproduction project (MRP)
N/A
Contributor guide
Assessment
This issue has not been assessed yet.