What is the format of your string? It is probably an hex value between 00
and FF. You need to add x in the front of your string or change your \%s
by \x%s in your makestring command.
Le samedi 17 aot 2013, aaronjmartin1986 a crit :
**
hi im new to simple + and I need a little help. I have this code that
compiles with no problems but when I put it in a simple windows programme
and compile the programme I get 4 warning's that say invalid escape
sequence on the 4 strings to be inserted into the makestring. thanks in
advance for any help.
/*
Compiler Directives
(Uncomment and declare compiler directives as needed)
*/
// #ENABLE_DYNAMIC
// #SYMBOL_NAME ""
// #HINT ""
// #DEFINE_CONSTANT
// #CATEGORY ""
// #PRINT_TO_TRACE
// #DIGITAL_EXPAND
// #ANALOG_SERIAL_EXPAND
// #OUTPUT_SHIFT
// #HELP_PDF_FILE ""
#DEFAULT_VOLATILE
#ENABLE_STACK_CHECKING
#ENABLE_TRACE
#ENCODING_ASCII
// #ENCODING_UTF16
// #ENCODING_INHERIT_FROM_PARENT
// #ENCODING_INHERIT_FROM_PROGRAM
/*
DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS
(Uncomment and declare inputs and outputs as needed)
*/
DIGITAL_INPUT Palette1, Palette2, Palette3, Palette4, Palette5;
STRING_INPUT RedLevel[20], GreenLevel[20], BlueLevel[20];
// STRING_INPUT Palette;
// BUFFER_INPUT
// DIGITAL_OUTPUT
// ANALOG_OUTPUT RedFB, GreenFB, BlueFB;
STRING_OUTPUT ColourTX$;
INTEGER Pal[20];
//Palette String Number
PUSH Palette1
{
MAKESTRING (Pal, "00");
}
PUSH Palette2
{
MAKESTRING (Pal, "03");
}
PUSH Palette3
{
MAKESTRING (Pal, "06");
}
PUSH Palette4
{
MAKESTRING (Pal, "09");
}
PUSH Palette5
{
MAKESTRING (Pal, "0c");
}
//Send String On Level Change
Change RedLevel, GreenLevel, BlueLevel
{
makestring
(ColourTX$,"\x00\x00\x04\x00\xA5\x00\x5A\x00\x09\x00\x21\x00\x72\x75\x6e\x2f\x65\x65\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\%02x\x00\x00\x00\x03\x00\%s\%s\%s\x01\x00\x01\x00\x00"
,(Pal[20]),(RedLevel),(GreenLevel),(BlueLevel));
}
--
Envoy� avec Ipad Gmail Mobile // Sent with Ipad Gmail Mobile
[Non-text portions of this message have been removed]