COMMAND:joinmessage(playerid, params[])
{
new string[128], file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", params[0]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
dini_Create(file);
dini_Set(file, "personalmsg", params[0]);
return 1;
}
COMMAND:joinmessage(playerid, params[])
{
new string[128], file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", params[0]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
new INI:File = INI_Open(file);
INI_SetString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
return 1;
}
|
Код:
COMMAND:joinmessage(playerid, params[])
{
new string[128], file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", params[0]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
new INI:File = INI_Open(file);
INI_SetString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=175565 |
(2072) : error 017: undefined symbol "INI_SetString"
(2073) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
COMMAND:joinmessage(playerid, params[])
{
new string[128], file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", PlayerInfo[playerid][JoinMessage]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
INI_SetString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
return 1;
}
(2072) : error 035: argument type mismatch (argument 1)
(2073) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
COMMAND:joinmessage(playerid, params[])
{
new string[128], file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", PlayerInfo[playerid][JoinMessage]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
INI_WriteString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
return 1;
}
INI_WriteString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
COMMAND:joinmessage(playerid, params[])
{
new string[128], INI:file[128], pName[MAX_PLAYER_NAME];
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", PlayerInfo[playerid][JoinMessage]);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "accounts/%s.ini", pName);
INI_Open(file);
INI_WriteString(file, "personalmsg", PlayerInfo[playerid][JoinMessage]);
INI_Close(file);
return 1;
}
INI_WriteString(file, "personalmsg", PlayerInfo[playerid][JoinMessage], 32);
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
(2071) : warning 213: tag mismatch
(2072) : warning 213: tag mismatch
(2073) : error 035: argument type mismatch (argument 1)
(2074) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
|
Still 2 errors
pawn Код:
@Bool, I have tried your code. pawn Код:
|
COMMAND:joinmessage(playerid, params[])
{
new string[128], pName[MAX_PLAYER_NAME], locfile[32];
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: {FFFFFF}/joinmessage [message]");
format(string, sizeof(string), "You have set your Join Message to: %s", params);
SendClientMessage(playerid, -1, string);
GetPlayerName(playerid, pName, sizeof(pName));
format(locfile, sizeof(locfile), "accounts/%s.ini", pName);
new INI:file = INI_Open(locfile);
INI_WriteString(file, "personalmsg", params);
INI_Close(file);
return 1;
}