|
Page 1 of 1
|
[ 5 posts ] |
|
| Author |
Message |
|
Coder A
Expert
Joined: Thu Jan 03, 2013 5:10 pm Posts: 138 Location: Southern Indiana
|
 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 asparagusI am not a robot! I am a unicorn! ~ quote from a robotPlay chess for free!
|
| Thu Feb 28, 2013 10:30 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 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
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Fri Mar 01, 2013 12:36 am |
|
 |
|
Coder A
Expert
Joined: Thu Jan 03, 2013 5:10 pm Posts: 138 Location: Southern Indiana
|
 Re: In-Program Error
_________________I'm not a robot! I'm british! ~ quote from an asparagusI am not a robot! I am a unicorn! ~ quote from a robotPlay chess for free!
|
| Fri Mar 01, 2013 9:41 am |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 495
|
 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
Expert
Joined: Thu Jan 03, 2013 5:10 pm Posts: 138 Location: Southern Indiana
|
 Re: In-Program Error
Oh, thanks. That is probably the problem. Thanks!
_________________I'm not a robot! I'm british! ~ quote from an asparagusI am not a robot! I am a unicorn! ~ quote from a robotPlay chess for free!
|
| Fri Mar 01, 2013 3:11 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 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
|
|