How to Check if Cloud Variables Have a Connection Error

Материал из Поле цифровой дидактики

Шаблон:Cloud DataШаблон:Wiki Standards This tutorial explains how to check if a user is having problems connecting to Cloud Variables.

Variables needed:

Debug?Debug?ResponseOldResponse

The code:

defineCloudvariableconnectioncheckRunwithoutscreenrefreshifResponse=0thensetResponseto1setOldResponsetoResponseelseifResponse=1thensetResponseto0setOldResponsetoResponseendendwait0.5secondsifResponse=OldResponsethensetDebug?to1setDebug?to1endwait0.5secondsifDebug?=Debug?thensetDebug?to2elsesetDebug?to0endwhenclickedsetDebug?to0foreverifDebug?=0andDebug?=1thensetDebug?to0endendwhenclickedhideforeverCloudvariableconnectioncheckifDebug?=2thenshowsayConnectionerrorortherearenootherplayerson.Thisnotifiesyouthattherearenootherplayersonoryourconnectionisn'tworking.elsehideendend