23.08.2018, 11:46
Like that?
4 errors in one line:
PHP код:
CMD:creategang(playerid, params[])
{
new gName[MAX_PLAYER_NAME], string[150], query[250];
if(pInfo[playerid][GangID] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "(gang) You can't make a gang since you already are in a gang");
if(sscanf(params, "s[100]", gName)) return SendClientMessage(playerid, COLOR_YELLOW, "(gang) Syntax: /creategang (gang name)");
if(CheckGangByName(gName)) return SendClientMessage(playerid, COLOR_YELLOW, "(gang) A gang with this name is already taken");
mysql_format(g_SQL, query, sizeof query, "INSERT INTO `gangs` (GangID, GangName, GangOwner) VALUES (NULL, '%s', '%s')", gName, PlayerName[playerid]);
mysql_tquery(g_SQL, query);
format(string, sizeof(string), "You created: '%s'", gName);
SendClientMessage(playerid, -1, string);
format(pInfo[playerid][NameGang], sizeof(pInfo[playerid][NameGang]), "%s", gName);
pInfo[playerid][GangID] = 1;
pInfo[playerid][NameGang] = gName;
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `idgang` = '1' WHERE `id` = '%d'", pInfo[playerid][ID]);
mysql_tquery(g_SQL, query);
return 1;
}
PHP код:
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 001: expected token: "]", but found "-identifier-"
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : warning 215: expression has no effect
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 001: expected token: ";", but found "]"
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 029: invalid expression, assumed zero
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : fatal error 107: too many error messages on one line
PHP код:
format(pInfo[playerid][NameGang], sizeof(pInfo[playerid][NameGang]), "%s", gName);