telegram-udf-autoit icon indicating copy to clipboard operation
telegram-udf-autoit copied to clipboard

I get an error when starting the UDF

Open eCxb3 opened this issue 2 years ago • 1 comments

I have a problem with _Polling, I tried to fix this error myself, but it didn't work, although when I downloaded your UDF everything worked, but after about 15 minutes, when I wanted to run the Autoit script again, I started getting an error

$OFFSET = $msgData[0] + 1
$OFFSET = $msgData^ ERROR

I tried to take the code that you show for example

While 1 ;Create a While that restart Polling
	$msgData = _Polling() ;_Polling function return an array with information about a message
	_SendMsg($msgData[2],$msgData[5]) ;Send a message to the same user with the same text
WEnd

but still this error comes out

"C:\Users\staso\Desktop\New folder (7)\src\Telegram.au3" (794) : ==> Subscript used on non-accessible variable.:
$OFFSET = $msgData[0] + 1
$OFFSET = $msgData^ ERROR
>Exit code: 1    Time: 2.255

Maybe I made a error, here is my code:

#include <src/Telegram.au3>

_InitBot('1907...:AAEjer1ifIkv_...')

_SendMsg("...", "Hello")

While 1
   $msgData = _Polling()
   _SendMsg($msgData[2], $msgData[5])
WEnd

The bot token is correctly specified in the code itself, since _SendMsg works

eCxb3 avatar Aug 16 '21 13:08 eCxb3