Computer Science Canada Help with drawbox.... (i think thats the problem) |
Author: | recneps [ Sat Dec 13, 2003 2:33 pm ] | ||
Post subject: | Help with drawbox.... (i think thats the problem) | ||
am i just a newbie or can drawbox not use variables instead of numbers?? im making a pong program and here it is...
and it says error at drawbox (p1x1, p1y1, p1x2, p1y2, 7) "argument is wrong type". whats wrong with it? you can use viariables right? |
Author: | AsianSensation [ Sat Dec 13, 2003 3:11 pm ] | ||
Post subject: | |||
drawbox doesn't take real numbers as it's parameters, make sure that either those coordinates are integers, or use
to round the real numbers into the closest integer, and then plug in the rounded value. |
Author: | DanShadow [ Sat Dec 13, 2003 5:03 pm ] | ||
Post subject: | |||
Hey AsianSensation...im having a problem that round could help with, could you private message me on how to use round in this situation:
If you can, thanks! |
Author: | recneps [ Sat Dec 13, 2003 7:33 pm ] | ||
Post subject: | how does round work? | ||
how does round work? like
|
Author: | Tony [ Sat Dec 13, 2003 7:36 pm ] | ||
Post subject: | |||
it's
Note: if you use division in your expression, then it will always return a real value, even if numbers divide evenly. |
Author: | DanShadow [ Sat Dec 13, 2003 8:30 pm ] | ||
Post subject: | |||
Ah! I get it. So for me its like:
neat, tx |
Author: | recneps [ Thu Dec 18, 2003 5:13 pm ] |
Post subject: | thnx |
thanks that good to know in future, but since the boards were down for a bit (?) i figured out i could use div to give me whole numbers only ![]() |