![]() |
[Summer Competition] My AI! - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: [Summer Competition] My AI! (/showthread.php?tid=1112) Pages:
1
2
|
Re: [Summer Competition] My AI! - El_Dindonnier - 21-10-2009 When I add all the code on a blank ms3.0.3. I have a runtime error 9 : Code: Runtime-error 9 Help me please ![]() Thanks you in advance. Re: [Summer Competition] My AI! - GIAKEN - 21-10-2009 It's obvious start is either < lbound or > ubound. Re: [Summer Competition] My AI! - El_Dindonnier - 21-10-2009 Lea Wrote:What value is start when it crashes?Start = 192 What is the problem ? :| Re: [Summer Competition] My AI! - El_Dindonnier - 21-10-2009 Lea Wrote:NV = (MAX_MAPX + 1) * (MAX_MAPY + 1) - 1Yes my map is 15 and 11. ![]() but how to fix the bug please ? EDIT : My bug is fixed ![]() I have lost to add : [code] o = MapNpc(y, x).y * (MAX_MAPX + 1) + MapNpc(y, x).x d = GetPlayerY(Target) * (MAX_MAPX + 1) + GetPlayerX(Target) For I = 0 To NV Marked(I) = 0 PathLine(I) = -1 Path(I) = -1 Next I For I = 0 To NV VY = Int(I / (MAX_MAPX + 1)) VX = I Mod (MAX_MAPX + 1) If VX >= 0 And VX < MAX_MAPX Then Mat(I, I + 1) = 1 If VX > 0 And VX = 0 And VY < MAX_MAPY Then Mat(I, I + MAX_MAPX + 1) = 1 If VY > 0 And VY |