The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => Topic started by: UPucker on July 29, 2005, 07:01:05 AM

Title: Assemble and link error
Post by: UPucker on July 29, 2005, 07:01:05 AM
fatal error a1011: directive must be in the control block

the line it errors at is at the end:

.elseif uMsg==WM_PAINT
        mov eax, [hWin]
        mov ecx, OFFSET ps
        push   ecx
        push   eax
        invoke BeginPaint, eax, ecx
        invoke BitBlt, eax, 0, 0, ScreenWidth, ScreenHeight, [canvasDC],0, 0, SRCCOPY
        call EndPaint   

.endif

.elseif uMsg==WM_COMMAND   <-- The error points to this line, but wherever I relocate the entire WM_Paint
                                                  elseif, it errors at the newxt uMsg check.

Am I not closing something out properly?

Title: Re: Assemble and link error
Post by: hutch-- on July 29, 2005, 07:48:37 AM
Zip your file and post it as there is not enough information to answer your question.
Title: Re: Assemble and link error
Post by: farrier on July 29, 2005, 09:01:42 PM
You can only have one and only one .endif per .if "control block"

.if

.elseif

.elseif

.else

.endif


hth

farrier