OnPlayerText
#2

Код:
if ((strcmp("LEARN!", text, true, strlen(text)) == 0) && (strlen(text) == strlen("yes")))
This statement can't possibly be true since you compare a 6 character string and then check if the given text is 3 characters. It can't be 6 and 3 characters long at the same time.

It should be this:

Код:
if ((strcmp("LEARN!", text, true) == 0))
Since text cannot be empty you don't need to check its length seperately. Same goes for the "Cancel" text. If you want "Cancel test" to be accepted as well you need to do this:

Код:
if ((strcmp("LEARN!", text, true, 6) == 0)
Note the 6 for the length of "LEARN!", not text's length.
Reply


Messages In This Thread
OnPlayerText - by playstores - 22.10.2018, 13:09
Re: OnPlayerText - by NaS - 22.10.2018, 13:15
Re: OnPlayerText - by playstores - 22.10.2018, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)