I collect the received SMS using this string :
The problem is that when I display the received sms string using the following:Code:DEBUGIN 5000,main2,[WAIT("UNREAD"), SKIP 3,STR num\13, SKIP 27,STR sms\25\13]
I get a very strange problem, which is that a SPACE comes before the sms string for some reason. However, when I do the same with another incoming SMS, the sms string stores it fine.Code:DEBUG "Num=",STR Num\13," SMS=",STR SMS,13,10
What is mean is this: (When the Debug command is executed)
I am scratching my head to find out why this is happening. If I change the SKIP 27 to 28 then I loose my first alphabet in some cases.Code:Num=1111111111111 SMS=admin Num=1111111111111 SMS= admin ' Notice the space before admin
I also tried the following:
But the code never enters this loop to correct this error for some reason. Any ideas???Code:If (SMS[0]=26) OR (SMS[0]=13) OR (sms[0]=10) then for a= 0 to 23 SMS[a]=SMS[A+1] next a Endif




Bookmarks