*gosub and *image hate each together apparently


#1

For some reason, putting a *image under a *gosub leads to a bad label error. The game seems to treat *gosub, text, and *image as if it’s all in one line.

Even placing the image several lines down behind text binds the previous sentence to it as a faulty label. Why is this happening?


#2

Seems to work fine for me?
Could you copy and paste your code between (pre)(/pre) tags, swapping the brackets for croc’s.


#3

Argh. Hate each other/if when together. Windows spellcheck is messing with my own mental grammar rules.


 #Don't turn around.
    *set task "none"
    *set message "BAD END."
    *gosub status_bar
    After a while, you feel a sharp sting at the side of your left foot's big toe. A freezing cold feeling rushes up your leg.
    
    It is numb. You've been poisoned.
    
    *image mid_snake.png right
    
    Suddenly you feel very, very sleepy.
    

    
    [b]The wastes do not reward weakness, and very rarely grants a second chance. You are hardly the first to die suddenly as a child.[/b]

    [b]You are mourned, but quickly forgotten.[/b]

This one works, but strips the line spacing as re:
https://dl.dropbox.com/u/644231/choicescript/web/mygame/badend1.png

*line_break shows up as actual text instead of adding spaces.


*label snake_choice
*temp snake_state
*gosub status_bar
*image mid_snake.png right
You see before you the distinctive fluorescent bands of a Midcrid Mutated Snake.

Its mutation, fins ending in claw-like points, allow it to do what few snakes can: dart forward quickly and completely off the ground in a straight line.

You freeze. 


just gives

line 416: bad label status_bar*image mid_snake.jpg

which is weird, because line 416 is just empty space in the previous choice, before the *goto endpoint command. Label endpoint exists, it’s the one that displays the stats screen in the bad end image.

*image mid_snake.jpg right is line 432.


#4

I’ve encountered a similar type of problem dealing with choicescript_stats. If you put a *lable between where it’s running together it should let the script know that it’s not all the same line. Not the best fix, but a good temporary patch until a better solution comes around.


#5

Just an empty label?
*label

This is the line breaks fix. Thanks.

I managed to fix the image issue somewhat, but it involved turning on Show End of Line in Notepad++. For some reason, some lines end up only with CR instead of a full CR LF break. It still goes fubar when the image is directly after a *gosub command, but as long as there’s a line of text in between ending in full break, the image should display correctly.