Page 1 of 1

SScanF not working

PostPosted: Sat Aug 15, 2009 10:06 am
by wildbat
Code: Select all
   PrintF("Jump1.....");
   int iLength = 30;
   CHAR * pcTextX = Malloc( iLength );
   CHAR * pcTextY = Malloc( iLength );
   CHAR * pcTextZ = Malloc( iLength );
   GetWindowText( GetDlgItem(hDialog, EDIT_X), pcTextX, iLength );
   PrintF("Jump2.....");
   GetWindowText( GetDlgItem(hDialog, EDIT_Y), pcTextY, iLength );
   PrintF("Jump3.....");
   GetWindowText( GetDlgItem(hDialog, EDIT_Z), pcTextZ, iLength );
   
   float tmpx;
   float tmpy;
   float tmpz;
   
   PrintF("Jump4.....%s",pcTextX);
   SScanF(pcTextX,"%f",tmpx);
   PrintF("Jump5.....");
   SScanF(pcTextY,"%f",tmpy);
   PrintF("Jump6.....");
   SScanF(pcTextZ,"%f",tmpz);




Script Stop after Jump4.....23.2315

anyclue?

PostPosted: Sat Aug 15, 2009 11:44 am
by L. Spiro
SScanF(pcTextX,"%f", &tmpx);
SScanF(pcTextY,"%f", &tmpy);
SScanF(pcTextZ,"%f", &tmpz);


L. Spiro