AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Chatscript 3.6 problems (bug)
 
 

For building me scripts I enter command:  “:build 1”  - program crash !!!

In source code:

1. File english.cpp .
2. function static char* InferAdverb(char* original, unsigned int len) .

code string:

  if (len >= 3 && !strcmp(word+len-3,“est”))
{
  adjectiveFormat = MOST_FORM;
  WORDP E = StoreWord(word,ADVERB|ADVERB_NORMAL,MOST_FORM);
  WORDP base = E;
  if (word[len-3] == word[len-4])
  { ........
//er
    if (len >= 3 && !strcmp(word+len-2,“er”)  )
{
  adjectiveFormat = MORE_FORM;
  WORDP E = StoreWord(word,ADVERB|ADVERB_NORMAL,MORE_FORM);
  WORDP base = E;
  if (word[len-3] == word[len-4])
  {........

If variable “len = 3” string “if (word[len-3] == word[len-4])” leads to error

fix ->  “if (len > 3 && !strcmp(word+len-2,“er”)  )”  This solution is suitable???
 

 

 
  [ # 1 ]

Its fine to change to that. I am changing the master source for both the “er” and “est” branches to test for len > 4, .e.g.
if (len > 4 && !strcmp(word+len-2,“er”)  )
and will rerelease a 3.61 shortly.

 

 
  [ # 2 ]

Ok. I wanted to ask about the internal buffer. When I write a rule
u: (*) my text .............................. ^ keep () ^ repeat ()

how long can be text and commands. You can increase the size of the buffer for string and commands “my text ............................^ keep () ^ repeat () ......... etc…...”  ???

 

 
  [ # 3 ]

The script compiler will tell you if your topic or rule is too big.  A topic is limited to 500,000 bytes.  A rule is similarly limited I think. The issue will be limits on output buffers (which can be changed), and on testing like :verify it might be 1500 depending.  I’d have to see a problem to know if it matters.

 

 
  login or register to react