About Store Forum Documentation Contact



Post Reply 
Element out of range Error
Author Message
Otolone Offline
Member

Post: #1
Element out of range Error
Hello!
I have been working on a FPS for some time.
I have two problems.
1)I created a world with player, NPCs, waypoints etc.When I change the position of the player character and rebuild my game,the position does not change when I run the app.
2) I decided to create a second world but each time I introduce the NPCs and play
test the level, I get the following error:

Element out of range.
File:"c:\esenthel\bin\esenthelengine\_\inline.h"
Line: 190

I do not get this error when I play test the first world.
Why am I getting this error?
Thanks in advance.
This the initial position.
    .
This is the new position.
    .
This is the position in the app.Same as original position
   
(This post was last modified: 03-07-2019 05:49 AM by Otolone.)
03-07-2019 04:57 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #2
RE: Element out of range Error
You might call something out of an array wrong somewhere?
For the first issue you might not set the character position right can we see it ?
03-07-2019 05:09 AM
Find all posts by this user Quote this message in a reply
Otolone Offline
Member

Post: #3
RE: Element out of range Error
Thanks.I have just updated the post with pictures.
(This post was last modified: 03-07-2019 05:50 AM by Otolone.)
03-07-2019 05:41 AM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #4
RE: Element out of range Error
Set camera pos to your player pos before first Game.World.update.
03-07-2019 08:00 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Element out of range Error
always do something like:
if(array.elms())array[0] // don't access element without knowing if it exists
or
if(InRange(i, array))array[i]
03-07-2019 12:06 PM
Find all posts by this user Quote this message in a reply
Post Reply