HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to call a textmacro in Zinc ?

03-22-2010, 01:29 PM#1
Troll-Brain
Collapse Zinc:
//! zinc

library TestLib
{
    //! textmacro t__TestLib_Init takes ARG1 , ARG2 , ARG3
        I = $ARG1$ + $ARG2$ + $ARG3$;
    //! endtextmacro
    
    integer I;
    
    function Test()
    {
        //! runtextmacro t__TestLib_Init("1","2","3")
        
    }

}
//! endzinc

EDIT : Fixed my error
03-22-2010, 02:17 PM#2
akolyt0r
runtextmacro should not be inside a function !?
03-22-2010, 02:40 PM#3
Ammorth
Try
Collapse Zinc:
 //! runtextmacro t__TestLib_Init("1","2","3")
03-22-2010, 03:15 PM#4
Troll-Brain
Quote:
Originally Posted by akolyt0r
runtextmacro should not be inside a function !?
It's declared inside the library TestLib and used inside the private function Test as far i see.

@Ammorth: Oh well ...
But it still doesn't work though (i have edited the code in the main post).
Unexpected "}", but when i comment the textmacro call it compiles, zinc bug or what ?

EDIT : Ok i've forgotten these ";" for the end line code (first time i try to use Zinc sorry)