hi,
i've got this here code :-
tile_type2 = _getpixel(map, x, y - 2)
while y < 2, the coordinates are off the bitmap. the docs say _getpixel() returns
-1 in such cases but in my program i get a crash as this line is executed.
I'm a bit puzzled.
tile_type2 is an int. I assume an int can hold a signed value. Is this right.
please help
I assume an int can hold a signed value. Is this right.
Yes. Unless you've declared it to be unsigned.
I don't think _getpixel does any bounds checking. Try getpixel instead.
the docs say _getpixel() returns -1 in such cases
They most definately do not:
These
won't work in mode-X, and don't do any clipping, so you must make sure
the point lies inside the bitmap.
You're confused with getpixel().
Grrrrrr, at the bug that causes underscores to not show up (is this a forum bug, or browser bug?). I thought he WAS using getpixel():
{"name":"590176","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/b\/1b22c6d1449bdeb7fa4c73e3c5a371cc.jpg","w":353,"h":50,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/b\/1b22c6d1449bdeb7fa4c73e3c5a371cc"}
is this a forum bug, or browser bug?
I have no idea what you're talking about. I can see underscores just fine... maybe check your font settings.
The underscore shows up fine here too.
Thanks
I supposed because getpixel() checkedl, _getpixel would too.
I'll let you know how I get on (so if someone would kindly bump for me?).
Thanks
I have no idea what you're talking about. I can see underscores just fine... maybe check your font settings.
I know I'm not the only person affected by this, as I've seen other mention it before. It's not a font problem, as sometimes the underscore is visible, and at other times not. This only occurs on underscores on hyperlinks, and it could be an Opera bug, as it looks fine with FF, but I've only ever seen it occur on this forum.
testing_testing
[edit]I can see the above underscore no problem, but the original is still not visible.
Yeah, I couldn't see the underscores either. Using Opera.
thanks for the help, it's working now.