Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Here is the image, the one I read pixels from: http://i.imgur.com/R56XPhp.png
Sourcecode for C#: http://pastebin.com/WcULhNg1
Sourcode for AS3: http://pastebin.com/5Bw6s4xh
And the errors because I do something really wrong with bitwise.
Operator '<<' cannot be applied to operands of type 'double' and 'int'
return 4.27819008 | _loc2_ << 16 | _loc3_ << 8 | _loc4_ << 0;
redredred RED everywhere.
Offline
You need both operands to be ints for << to work. You are using doubles as left operands
Offline
I imagine some super knowledgeable developer will either ninja me or prove me wrong, but I'm thinking there's somethign specific to AS3 notation that's giving you the issue.
4.27819008E9 (AS3)
4.27819008 (C#)
If I throw the AS3 number right into the web console, I get
4278190080
What that means, I'm not sure. Though it appears to be the decimal * 10^9 but yeah dunno
ninja edit:
Well, I still think my idea stands, but a valid point. I never could get C# to bitshift dem doubles. Why? dunno. There's probably a library out there.
Offline
I imagine some super knowledgeable developer will either ninja me or prove me wrong, but I'm thinking there's somethign specific to AS3 notation that's giving you the issue.
4.27819008E9 (AS3)
4.27819008 (C#)If I throw the AS3 number right into the web console, I get
4278190080
What that means, I'm not sure. Though it appears to be the decimal * 10^9 but yeah dunnoninja edit:
Well, I still think my idea stands, but a valid point. I never could get C# to bitshift dem doubles. Why? dunno. There's probably a library out there.
Doubles are not represented like integers (see image below), so shifting them would/could cause unexpected behavior
Image from wikipedia, for more information see here
Shifting it would cause both the exponent and fraction part to shift, so unless you know what is in each part, you won't know what it would produce.
Can't really help with the AS3 part though, as I have never used it, but I guess it's the same problem.
Offline
You need both operands to be ints for << to work. You are using doubles as left operands
It doesn't work if I change them to int or not. Still the same issues.
Offline
Jonathan1003 wrote:You need both operands to be ints for << to work. You are using doubles as left operands
It doesn't work if I change them to int or not. Still the same issues.
Operator '<<' cannot be applied to operands of type 'double' and 'int'
| also requires both operands to be int, the 4.27819008 OR-ing with the 3 other results may also cause errors
This error seems pretty explicit, are you sure there's not something else messing with the code?
Offline
[ Started around 1732459132.6525 - Generated in 0.052 seconds, 12 queries executed - Memory usage: 1.45 MiB (Peak: 1.57 MiB) ]