Author Topic: GuiBitmapCtrl::SetBitmap not accepting relative paths...  (Read 792 times)

I have an array of GuiBitmapCtrl objects and each bitmap needs to be periodically updated.

Code: [Select]
// Add-Ons/Script_MyAddon/client.cs
$myScript::imageNames[0] = "./images/image0.png";
$myScript::imageNames[1] = "./images/image1.png";
$myScript::imageNames[2] = "./images/image2.png";

// ...

$myScript::bitmapArray[%x, %y].setBitmap($myScript::imageNames[%index]);
The game throws errors and doesn't correctly load the image when setBitmap is passed a string containing a relative file path. I've tried a few things but to no avail. Am I doing anything wrong here, or am I just going to have to use an absolute path?
« Last Edit: October 16, 2013, 01:19:11 AM by Lucius »

x.setBitmap(findFirstFile("./images/image0.png"));

x.setBitmap(findFirstFile("./images/image0.png"));

What about expandFileName?

x.setBitmap(findFirstFile("./images/image0.png"));
What about expandFileName?
These both work. Thanks so much!