Re: cos: "Integer Required"?!?!?!?

2006-06-14 Thread moonman
It appears that the cause of this problem was indirect. I input something incorrect as an argument to an xplane sdk function and the cos/integer type error followed. Thanks for the help. The diagnostic functions I learned in this thread will be very helpful in the future. moonman wrote: > I'm u

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread moonman
I'm using ActiveState PythonV2.4.1 I'm certainly not affecting 'math'. I wonder if the XPlane SDK Python binding is touching anything. I'll download the latest ActiveState Python and keep on plugging. Thanks! Mikael Olofsson wrote: > moonman wrote: > > print self.ACphi, type(self.ACphi) yields

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread Mikael Olofsson
moonman wrote: > print self.ACphi, type(self.ACphi) yields: > 19412557 > > value = XPLMGetDataf(self.ACphi); print value type(value ) yields: > -0.674469709396 > > print math.radians(XPLMGetDataf(self.ACphi)), > type(math.radians(XPLMGetDataf(self.ACphi))) yields: > > TypeError > : > an integ

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread Fredrik Lundh
moonman wrote: > print self.ACphi, type(self.ACphi) yields: > 19412557 > > value = XPLMGetDataf(self.ACphi); print value type(value ) yields: > -0.674469709396 > > print math.radians(XPLMGetDataf(self.ACphi)), > type(math.radians(XPLMGetDataf(self.ACphi))) yields: > > TypeError > : > an inte

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread moonman
print self.ACphi, type(self.ACphi) yields: 19412557 value = XPLMGetDataf(self.ACphi); print value type(value ) yields: -0.674469709396 print math.radians(XPLMGetDataf(self.ACphi)), type(math.radians(XPLMGetDataf(self.ACphi))) yields: TypeError : an integer is required Am I totally missing s

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread Larry Bates
First: Always post cut-paste tracebacks so we can see actual error message. Second: print out self.ACphi, XPLMGetDataf(self.ACphi) and math.radians(XPLMGetDataf(self.ACphi)) before this statement and you will find the problem. -Larry Bates moonman wrote: > Hello all, > > I've just jumped into

Re: cos: "Integer Required"?!?!?!?

2006-06-08 Thread Fredrik Lundh
moonman wrote: > import math > > > > cos_phi = math.cos(math.radians(XPLMGetDataf(self.ACphi))) # Error > occurs here what error ? it's a lot easier to help if you include the traceback. > Now XPLMGetDataf should be returning float. should be ? have you verified this ? try adding

cos: "Integer Required"?!?!?!?

2006-06-08 Thread moonman
Hello all, I've just jumped into Python trying to develop X-Plane plugins. All was chugging along well until I tried to use math.cos() snippet: import math cos_phi = math.cos(math.radians(XPLMGetDataf(self.ACphi))) # Error occurs here Now XPLMGetDataf should be returning float. Is th