There seem to be two problems. First of all, you seem to think that creating a game means gathering a lot of code snippets and then putting them together, like Lego. However, not every piece of code was designed to be 'plug and play'. That is only true for decent libraries, which should be included in your project and interacted with through their interface. In your case, you would have to understand the code snippet before you could create something alike in your game by yourself, which would not yield errors. Or, in other words, it looks like you'd need learning to crawl, before running, by working with proper tutorials, starting here.
The second problem would be that you seem to assume people an magically read your mind and source code and thus know what is going on at line 170 in AI.dm. That is, most fortunately, not the case, which is why you are supposed to provide a code snippet inside <dm></dm>-tags, that contains anything relevant to the problem. |
|