22.06.2017, 16:51
I have encountered an issue with passing on strings.
Calling the timer
Timer's declaration
When printed in-game, it just prints blank and in the console it prints out the few last characters that I printed out because it is called from OnPlayerText:
I tried to rename the variable in the timer to something else other than "text" since it seemed like it was referencing to the OnPlayerText(playerid, text[]) this text variable name but it didn't help either.
Any ideas of what I might be doing wrong?
Calling the timer
Код:
defer SpecialNumberNextQuestion(playerid, "test");
Код:
timer SpecialNumberNextQuestion[1000](playerid, string:text[]) { printf("Text printed: %s", text); SendClientMessage(playerid, COLOR_YELLOW, text); }
I tried to rename the variable in the timer to something else other than "text" since it seemed like it was referencing to the OnPlayerText(playerid, text[]) this text variable name but it didn't help either.
Any ideas of what I might be doing wrong?