Variable names can have underscores, but the problem is that you can only declare local variables at the base level of the function, not within a while or for loop or whatever. ... I know, I know. So if you move the variable declaration outside the while loop, it'll work.
Edit: like so.
void autoexec()
{
string _im = 'Dragonfire Shirt 1.jpg';
int im = LoadImage( _im );
while (!b3)
{
RectFill(0, 0, ImageWidth(screen), ImageHeight(screen), 0, screen);
PrintCenter(ImageWidth(screen)/2, ImageHeight(screen)/2, screen, 0, 'Hello World!');
ShowPage();
}
Exit('Bye!');
}
You could still put the assignment inside the loop, but I moved them out because as you had it, it was loading the image at each frame and causing a big memory leak. You only need to load the image once, so, outside the loop.