Entity does not exits
Blitz3D Forums/Blitz3D Beginners Area/Entity does not exits
| ||
Gives an entity does not exist error. (yes, the picture loads find, but position entity crashes the program) p="ph\DSC018" s=".JPG" Dim still(27) still(0)=LoadSprite(p+"49"+s) PositionEntity still(0),0,1,5 |
| ||
So, wait a minute... The sprite actually displays onscreen, with the correct texture? But when you use PositionEntity(), then the program crashes? Am I reading you correctly? |
| ||
Check the value of still(0) - if it is 0 then the sprite has not loaded correctly. |
| ||
p="ph\DSC018" s=".JPG" Dim still(27) still(0)=LoadSprite(p+"49"+s) If still(0) = 0 Then Print "Oh Noes!!!" : Waitkey : End PositionEntity still(0),0,1,5 Always check that a loaded entity has loaded correctly. |
| ||
And try using p$ and s$ instead of p and s. |
| ||
And try using p$ and s$ instead of p and s. D'OH; how could we all miss that?! *slaps forehead* XD |
| ||
And try using p$ and s$ instead of p and s. That worked. Thanks everyone |