2D Perlin Noise Code 217 Range check error - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

2D Perlin Noise Code 217 Range check error

PeasantsPeasants Posts: 3Member
edited October 2013 in Pascal
Hi,

I've run into a little problem while writing a terrain generator in PASCAL for a Minecraft-type sandbox game.

I am storing all block data in an array of records, each with a "noiseID" entry, which is the data generated by the "PerlinNoise" function, and decides what the block should be.

The PerlinNoise function, however, is not working. I followed the instructions on this site and transferred the code over to pascal:
http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

However, the "smoothNoise" function is not working properly. Once called, the program exits with code 217. The output says "range check error", but I don't see how anything is out of range.



Here is the code (download Link):
http://www.sendspace.com/file/jd6xvq
Tagged:
Sign In or Register to comment.