|
Page 1 of 1
|
[ 5 posts ] |
|
Author |
Message |
Coder A
Moderator
Joined: Thu Jan 03, 2013 5:10 pm Posts: 207 Location: The plateau north of the Ohio River Valley, also known as Cave Country.
|
 In-Program Error
Hello,
As I was running some new code I made on the emulator, I received an error message ( type 59 ). This is the line of error:
p1.yposcu = round((float)((g*(time^2))+(p1.velosz*sinDegrees(p1.thetsz)*time)+p1.ypossz));
p1.yposcu is a short, p1.thetsz is a short equal to 30, p1.ypossz is a short equal to 10, p1.velosz is a short equal to 5, and time is a float.
g is a constant equal to -9.8.
It does not matter what time is. The error I get is 'real address range exception(59)'.
What went wrong?
Thanks in advance for helping.
-Coder A
_________________ I'm not a robot! I'm british! ~ quote from an asparagus I am not a robot! I am a unicorn! ~ quote from a robot
|
Thu Feb 28, 2013 10:30 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: In-Program Error
How about you provide us with a piece of actual code that can reproduce this issue. Sometimes the error is actually on the line BEFORE the highlighted one.
= Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Fri Mar 01, 2013 12:36 am |
|
 |
Coder A
Moderator
Joined: Thu Jan 03, 2013 5:10 pm Posts: 207 Location: The plateau north of the Ohio River Valley, also known as Cave Country.
|
 Re: In-Program Error
_________________ I'm not a robot! I'm british! ~ quote from an asparagus I am not a robot! I am a unicorn! ~ quote from a robot
|
Fri Mar 01, 2013 9:41 am |
|
 |
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 496
|
 Re: In-Program Error
Just as a heads up, x^y isn't x to the power y in C. It's a bitwise XOR operator.
_________________ sudo rm -rf /
|
Fri Mar 01, 2013 10:38 am |
|
 |
Coder A
Moderator
Joined: Thu Jan 03, 2013 5:10 pm Posts: 207 Location: The plateau north of the Ohio River Valley, also known as Cave Country.
|
 Re: In-Program Error
Oh, thanks. That is probably the problem. Thanks!
_________________ I'm not a robot! I'm british! ~ quote from an asparagus I am not a robot! I am a unicorn! ~ quote from a robot
|
Fri Mar 01, 2013 3:11 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|