error 001: expected token: "]", but found "-identifier-" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
enum NewbieMessagesInfo
{
nMessage[518]
};
new NewbieMessageInfo[MAX_NEWBIESMESSAGES][NewbieMessagesInfo];
stock SendQuestion(playerid, message[])
{
format(NewbieMessageInfo[playerid][nMessage], sizeof(NewbieMessageInfo[playerid][nMessage]), "%s", message);// this is the error line
//Other code
}
#include <a_samp> #define MAX_NEWBIESMESSAGES (500) #define MAX_MESSAGE_STR (518) enum NewbieMessagesInfo { nMessage[MAX_MESSAGE_STR] }; new NewbieMessageInfo[MAX_NEWBIESMESSAGES][NewbieMessagesInfo]; main() { } public OnPlayerConnect(playerid) { SendQuestion(playerid, "TR"); return 1; } stock SendQuestion(playerid, message[]) { format(NewbieMessageInfo[playerid][nMessage], MAX_MESSAGE_STR, message); }
Код:
#include <a_samp> #define MAX_NEWBIESMESSAGES (500) #define MAX_MESSAGE_STR (518) enum NewbieMessagesInfo { nMessage[MAX_MESSAGE_STR] }; new NewbieMessageInfo[MAX_NEWBIESMESSAGES][NewbieMessagesInfo]; main() { } public OnPlayerConnect(playerid) { SendQuestion(playerid, "TR"); return 1; } stock SendQuestion(playerid, message[]) { format(NewbieMessageInfo[playerid][nMessage], MAX_MESSAGE_STR, message); } |