هل تعلم بوت Libre كما يوفر مجانا استضافت الدردشة الحية على موقع الويب الخاص بك أو الهاتف المحمول التطبيق ؟
Self, AIML, and scripting : Order of execution of scripts

RE: Order of execution of scripts

قبل admin نشر Dec 18 2017, 8:59

You are correct, there is one root state in a Self script, and states and functions must be self contained in a script file, they cannot call other states or functions in other scripts.

If you really need to redirect to another script file, you can use a redirect() or srai() operation to redirect to another question that the script answers.

For example:

state whats {
  pattern "whats *" answer whatIs();
  function whatIs() {
    if (star == "your name") {
      return redirect("what is your name");
    }
    return WikiData.search(star);
  }
}


معرف: 20168750
نشر: Dec 18 2017, 8:59
الردود: 0
الآراء: 3126, اليوم: 2, الأسبوع: 18, الشهر: 17
0 0 0.0/5