So, here is what I am trying to do. It seems like it would be simple, but I keep getting an error:

Code:
...

var max_quant_entFrom;

...

PANEL* invTransferAmount =
{
	layer = 1;
	
	digits (590, 490, 5, *, 1, transf_amt);
	button(640, 510, "transfer_button_click.pcx", "transfer_button.pcx", "transfer_button_hover.pcx",
	       buttonTransferItems, NULL, NULL);
	hslider(450, 514, 150, "horizontalSlider.pcx", 0, max_quant_entFrom, transf_amt);
}


I am trying to make the hslider max value be dynamic, to always equal the current value of max_quant_entFrom . However, I am getting this error:

Code:
Compiling PROGRAM.C - [Esc] to abort......................................
< hslider(450,514,150, "horizontalSlider.pcx", 0, max_quant_entFrom, transf_am>
PROGRAM.C 7:6 (): Number syntax max_quant_entFrom
.. 1.695 sec.
1 runtime errors
Error E355: Startup failure - any key to abort



If I change the "max_quant_entFrom" value to a number like 50, then I get no errors, except that the max value is static at 50, instead of being dynamic to always equal "max_quant_entFrom". I know that max_quant_entFrom has a value, but it is not allowing the hslider to go error free in trying to use it.

Does anyone know what I am doing wrong to always get this error when I use "max_quant_entFrom" as the max value in hslider?