Hi again...
I have here some code I tried to translate from another language to this one. It has errors, I don't know what they are or why. I'm hoping you could not only fix the errors, but tell me why they were errors. In detail.
This should take what the player types in, compare it to an array containing other strings, and show the strings that contain the player's string at the beginning. It would show these in the Actor's text.
Keyboard_string is a string added to everytime the player types a key.
Verbs is the array of possible strings.
[i]
i=0;
j=0;
if (keyboard_string!="")
{
while (verbs[i]!="")
{
char * strncpy(char *temp_string, const char *verbs[i], size_t strlen(const char *keyboard_string));
if (char *strncmp(char *keyboard_string, const char *temp_string, size_t strlen(const char *keyboard_string))==1)
{
if (j<=6)
{
strcpy(text,verbs[i]);
strcpy(text,"#"); // I don't know how to put a return symbol, this is what I used before.
j+=1;
}
}
i+=1;
}
}
MiG3