The error is thrown before reaching that line: var a = BlockRenderData.vertices[face[0]] + blockPosition;
I’ve written a procedural world generation script using C# in Godot 4, but it’s throwing an error on project startup. Even though I’m using Tool, the visual representation of my chunks isn’t being generated, no matter how many times I reload the project. The debugger is complaining about something related to “face” and determining the corners of a square, but I can’t figure out how to fix it. What’s wrong with my code and how can I resolve this issue? Any help would be greatly appreciated!
The error message only tells what kind of problem it is having, or the result of a problem in another word. But analyzing an error needs to know what you did and what are you going to do, so that it’s possible to find out what causes the problem.
Okay, I’ll try to explain everything in more detail again. I decided to make a procedural generation of the world using a tutorial on YouTube, but my script doesn’t work, although everything works correctly in the example provided in the video.
When starting the project, it returns an error: Uploading: 2025-04-25_13-37-18.png… Uploading: 2025-04-25_13-37-03.png… Uploading: 2025-04-25_13-36-49.png…
the error refers to the first line of creating a mesh square face for a cube that consists of one chunk. As I understand it, he complains that the values are coming out or missing in the face array. I checked the length of the array, and as expected, it consists of four elements (the four corners of the square). Uploading: 2025-04-25_13-43-40.png…