This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-05 04:14:19

digirus
New Scratcher
Registered: 2011-02-16
Posts: 1

Problem with send variable to Scratch

I write program for sending and receive data on 42001 port.
Writed on microsoft visual studio.

                  SendBuf[0]=0;
                  SendBuf[1]=0;
                  SendBuf[2]=0;
                  strcpy(SendBuf+4, "sensor-update \"ppp\" 49 ");
                  SendBuf[3]=strlen(SendBuf+4);
                 
                  send(conn_socket,SendBuf,SendBuf[3]+,0);

If i send to scractch broadcast message, scratch is received this. if I send variable, scratch is not receive. Where I can mistake?

Offline

 

#2 2011-03-05 18:59:27

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Problem with send variable to Scratch

Is the "SendBuf" list required?

Code:

send(conn_socket,'sensor-update number 4')

What's the error you are getting?

Offline

 

#3 2011-03-07 13:38:28

frowned
Scratcher
Registered: 2010-11-02
Posts: 42

Re: Problem with send variable to Scratch

just embed python and use my library, problem solved  big_smile

Offline

 

Board footer