hi im getting this error and i cant fix it.I compared with the one on GtiHub and cant find the solution
Assets\Scripts\Pathfinding.cs(108,45): error CS0019: Operator ‘-’ cannot be applied to operands of type ‘GridPosition’ and ‘GridPosition’
thx and good job Hugo and GameDevTV im enjoying all the courses i buyed
sorry i dont understand what you mean im not really good at coding,but i made the script myself then the error showed up since i wroted the line,then i copied the Git resource and the problem is still there,the script is now like the resource
When we made the GridPosition struct, we overrode the ‘+’ and ‘-’ operators. This lets C# know how to add and subtract one GridPosition to/from another. You would have done that if you have a GridPosition struct and you followed the course. If you did that, show the GridPosition code so we can have a look at it