SRL Archive - Jr. Member General Help and Discussion

TMufasaBitmap.drawBitmap(): not working


CRASH_OVERRIDE

2014-06-29 05:48:02

Function:
TMufasaBitmap.drawBitmap():
smartImage.drawBitmap('Simba/Scripts/Background.png', Point(0, 417));

i don't think this function works, it just keeps giving the error:
 File path does not exist ("Simba/Scripts/Background.png"), result = false

The image is in the correct path and is the right name etc.



I also noticed that:
fileExists('Scripts/Background.png')

Gives the same error as well.

masterBB

2014-06-29 05:56:01

smartImage.drawBitmap(ScriptPath + 'Background.png', Point(0, 417));

How about this? Because what you pasted isn't really a path, is it?

Smidqe

2014-06-29 05:59:21

smartImage.drawBitmap(scriptPath + 'Background.png', Point(0, 417))

You need the full path, what you have there is that it would search for a file in path 'Simba/scripts/' and of course that doesn't exist. Correct one would be 'C:\Simba\Scripts'.

Simba also has variables for different paths, removing the need to have 'C:\Simba'
scriptPath
appPath
includePath
pluginPath

CRASH_OVERRIDE

2014-06-29 06:04:08

AHHH! Sweet, makes sence. Cheers fellas.