cos: "Integer Required"?!?!?!?
Fredrik Lundh
fredrik at pythonware.com
Thu Jun 8 10:52:36 EDT 2006
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
print self.ACphi, type(self.ACphi)
value = XPLMGetDataf(self.ACphi)
print value, type(value)
before the cos_phi line, and let us know what it prints.
> Is there something that I'm completely missing about how Python does
> tyonig or something?
not necessarily, but you may need to work a little on your trouble-
shooting skills (rule 1: when in doubt, use print. print is your friend).
</F>
More information about the Python-list
mailing list