Posted By: miko93
Using a #define value in a vslider definition - 05/24/08 15:19
Hello all.
I'm trying to use a "#define XX" value in my vslider definition, but somehow this won't work. Please take a look at this code here:
The problem is that as soon as I try to use the #define'd value in my definition of vslider (2nd panel), the compiler gives out a "number syntax" error.
Any hints why this is not working? Thanks a lot.
I'm trying to use a "#define XX" value in my vslider definition, but somehow this won't work. Please take a look at this code here:
Code:
#include <acknex.h> #include <default.c> #include <stdio.h> #include <windows.h> #define MYRANGE 50 BMAP* bmSlider = "slider.bmp"; var SliderPosition = 1; PANEL* pPanel1 = // This works ok. { flags = VISIBLE; vslider = 494, 2, 125, bmSlider, 1, 50, SliderPosition; } PANEL* pPanel2 = // This gives a syntax error, pointing to MYRANGE. { flags = VISIBLE; vslider = 494, 2, 125, bmSlider, 1, MYRANGE, SliderPosition; } function main(void) { video_mode = 8; // 1024x768 fps_max = 60; level_load(""); wait(3); while (1) { wait (1); } }
The problem is that as soon as I try to use the #define'd value in my definition of vslider (2nd panel), the compiler gives out a "number syntax" error.
Any hints why this is not working? Thanks a lot.