|
|
I'm attempting to write a macro that looks up a value in a table, as follows
#macro __get_table_element1( tbl, e, n )
// Macro to calculate interpolated value from table.
#local tick = clock * 1399;
#local ftick = floor( tick );
#local i0 = ( ftick * n ) + e;
#local i1 = i0 + n;
#if ( 1399 - ftick )
( tbl[i1] )
#else
( tbl[i0] )
#end
#end
When I invoke the macro, as here
#local q10 = __get_table_element1( clip_array, 0, 6 )
for example, I get the folloiwng error:
File: fnord Line: 141
Possible Parse Error: All #version and #declares of float, vector, and color
require semi-colon ';' at end.
In order to get the script to work, I have to run in version 3.1 mode.
If I add a semicolon, either after the return value or at the end of the
local declaration, I get a syntax error.
I believe I've R'd TFM, but I may have missed something.
Thanx.
Post a reply to this message
|
|