Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Checking for nil in an array?

Author
Message
Ohwrake
6
Years of Service
User Offline
Joined: 4th Sep 2018
Location: Belgium
Posted: 7th Sep 2018 16:12
Hello there,

I'm working on an AI, pathfinding.
Now the problem that occurred to me is as follows: I check every surrounding tile around the AI and check if they are passable or not when the AI reaches the limit of the level AppGameKit will return an error because the array is out of entries.

My question: is there a way to bypass this?

this is how I do it now, but when the AI reaches a wall it will return an error.


Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

puzzler2018
User Banned
Posted: 7th Sep 2018 16:22
This post has been marked by the post author as the answer.
Maybe check the boundaries



Login to post a reply

Server time is: 2024-11-23 15:31:46
Your offset time is: 2024-11-23 15:31:46