123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|557|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Abs error?

Sat, 12 Mar 2022, 08:00
spinal

Abs error?


With 3 arrays like following...


The following code gives an "Operator can not be applied to stings" error on the
line. No idea why



-=-=-
Check out my excellent homepage!
Sat, 12 Mar 2022, 09:19
Jayenkai
What an odd error!
Have you tried forcing them to be numbers with the .. um.. I want to say % sign?
Dim maskR%(...)
I think.

*tries*

.. Oddly, I'm not getting the error.

-=-=-
''Load, Next List!''
Sat, 12 Mar 2022, 09:28
spinal
Turns out I dont *need* to check the g and b values for what I want, but.... it is very odd. Maybe its a memory problem?

-=-=-
Check out my excellent homepage!
Sat, 12 Mar 2022, 09:29
Jayenkai
Are you still using that "Not Mark's coding" version of Blitz?

-=-=-
''Load, Next List!''
Sat, 12 Mar 2022, 10:07
spinal
This one...



-=-=-
Check out my excellent homepage!
Sat, 12 Mar 2022, 10:19
Jayenkai
Hmm.. that's mine. *shrugs*
Maybe something else, somewhere in the code.
Who knows...

-=-=-
''Load, Next List!''
Sat, 12 Mar 2022, 10:37
spinal


-=-=-
Check out my excellent homepage!
Sat, 12 Mar 2022, 10:59
Jayenkai
It's the b variable.
b$=f <---

Then later you use b for blue.

-=-=-
''Load, Next List!''
Sat, 12 Mar 2022, 11:05
spinal
Dammit

Why couldn't blitz tell the difference between b and b$... gggrrrrrr

-=-=-
Check out my excellent homepage!
Sat, 12 Mar 2022, 14:04
Dan
Its a bit odd, yes, but only if you come to blitz basic from other languages, which do make such distinctions.

On the other hand, if you see it on the brighter side:

You are defining the variable either as string, int or float - ONCE, and then later you do not need to use the that extra char. (yes the readability/debugabilitiy is maybe not so well, but ...)



I think that is better than to have the variables defined and to be forced to use the same definiton in the code later ...

see: