なにがいけないのでしょうか?
APIからのDM送信はAPI制限に引っ掛かりそうなので、DMが来たらdialogを表示させるようにしていますが、どうもうまくいかないようなので、わかる人がいましたら、ご教授お願いします。
dim jsonPtrRoot sdim sender_id sdim recipient_id repeat GetDirectMessage 5 response = getResponseBody() jsonopen jsonPtrRoot, response if (jsonPtrRoot == 0) : dialog "jsonの読み込みに失敗" : end jsongetobj JsonPtrEvents,"events" jsonnext chilledptr,JsonPtrEvents , 2 jsongetobj message_create,"message_create",chilledptr jsongets old_sender_id,"sender_id",message_create jsonclose wait 100 GetDirectMessage 5 response = getResponseBody() jsonopen jsonPtrRoot, response if (jsonPtrRoot == 0) : dialog "jsonの読み込みに失敗" : end jsongetobj JsonPtrEvents,"events" jsonnext chilledptr,JsonPtrEvents , 2 jsongetobj message_create,"message_create",chilledptr jsongets sender_id,"sender_id",message_create if old_sender_id != sender_id {;sender_idが異なっているかの処理 jsongetobj target,"target",message_create jsongets recipient_id,"recipient_id",target jsongetobj message_data,"message_data",message_create jsongets dmtext, "text", message_data dialog "target "+target+"\nrecipient_id "+recipient_id+"\ntext "+dmtext } jsonclose wait 100 /* mes dmtext mes sender_id mes recipient_id */ loop