09.04.2018, 16:19
Hi, I have some problem.
When compiling, an error arises: Эarray must be indexed (variable "-unknown-")"
The error occurs because of the parameter "myInfo[playerid][myName]", if instead substitute, for example
Then the script will compile without errors. Thank you in advance for your help
Код:
enum example { myName[MAX_PLAYER_NAME] }; new myInfo[MAX_PLAYERS][example], testStr[MAX_PLAYER_NAME]; format(testStr, sizeof(testStr), "%s", IsPlayerConnected(playerid) ? (myInfo[playerid][myName]) : ("Player is not connected"));
The error occurs because of the parameter "myInfo[playerid][myName]", if instead substitute, for example
Код:
format(testStr, sizeof(testStr), "%s", IsPlayerConnected(playerid) ? ("My_Name") : ("Player is not connected"));