#33 SendRemoteString problem

compiler
closed-fixed
nobody
NBC (24)
5
2007-09-26
2007-09-02
Rupert
No

The "SendRemoteString" function does not seem to compile. I can't seem to figure out what the problem would be. I've fiddled around with the arguments, but it seems that m calling it the right way, its just not compiling right.

The following code shows the problem

//#include "BTLib.nxc"
//#include "utilities.nxc"

#define CONN 1
#define MAILBOX 1

task main() {
int ret=BluetoothStatus(CONN);
string bla;
if ( ret!=0 ) {
while (true) {
//send beep every second
ClearScreen();
Wait(500);
bla=StrCat("BEEP");
SendRemoteString(CONN, MAILBOX, bla);
TextOut(0,LCD_LINE4,"Sent beep",0);
Wait(500);
}
} else {
ClearScreen();
TextOut(0,LCD_LINE4,"Error",0);
//waitButton();
}

}

Attempting to compile this gives the error
Line 17: Error: Error parsing expression: str
Line 17: Error: Invalid array argument: __constVal0

Line 1 is the TextOut line, but the error is caused by the SendRemoteString line.

thanks
Rupert B.

Discussion

  • John Hansen
    John Hansen
    2007-09-26

    Logged In: YES
    user_id=661666
    Originator: NO

    This bug is fixed in the b33 release. (http://bricxcc.sourceforge.net/test_release.zip). Beta 33 will be released by September 30, 2007.

    John Hansen

     
  • John Hansen
    John Hansen
    2007-09-26

    • labels: --> NBC
    • milestone: --> compiler
    • status: open --> closed-fixed