float unknow by compiler
Brought to you by:
afanofosc,
afanofosc_99
I use nbc complier with linux Ubuntu.
When i declare a float variable, the compiler don't recognize the instruction.
by exemple if i declare a variable
float x;
The result after compilation is :
# Error: Undefined Identifier float
File "/home/vigne/Documents/LEGO FLOU/NXC/test.nxc" ; line 3
# float
#----------------------------------------------------------
# Error: Undeclared identifer: float
File "/home/vigne/Documents/LEGO FLOU/NXC/test.nxc" ; line 3
# float
#----------------------------------------------------------
# Error: '=' expected
File "/home/vigne/Documents/LEGO FLOU/NXC/test.nxc" ; line 3
# float x;
What is the problem?
Thanks
You either need a newer version of the compiler or you need to tell the compiler that you are targetting version 1.28 or higher of the NXT firmware. Try adding -v=128 to the command line.
nbc -v=128
The most recent version of the compiler uses 128 as the default target version so you may not have the latest.