Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.