problem with saying gang name
#10

Like that?

PHP код:
CMD:creategang(playeridparams[])
{
    new 
gName[MAX_PLAYER_NAME], string[150], query[250];
    if(
pInfo[playerid][GangID] == 1) return SendClientMessage(playeridCOLOR_YELLOW"(gang) You can't make a gang since you already are in a gang");
    if(
sscanf(params"s[100]"gName)) return SendClientMessage(playeridCOLOR_YELLOW"(gang) Syntax: /creategang (gang name)");
    if(
CheckGangByName(gName)) return SendClientMessage(playeridCOLOR_YELLOW"(gang) A gang with this name is already taken");



    
mysql_format(g_SQLquerysizeof query"INSERT INTO `gangs` (GangID, GangName, GangOwner) VALUES (NULL, '%s', '%s')"gNamePlayerName[playerid]);
    
mysql_tquery(g_SQLquery);


    
format(stringsizeof(string), "You created: '%s'"gName);
    
SendClientMessage(playerid, -1string);
    
    
format(pInfo[playerid][NameGang], sizeof(pInfo[playerid][NameGang]), "%s"gName);

    
pInfo[playerid][GangID] = 1;
    
pInfo[playerid][NameGang] = gName;

    
mysql_format(g_SQLquerysizeof query"UPDATE `players` SET `idgang` = '1' WHERE `id` = '%d'"pInfo[playerid][ID]);
    
mysql_tquery(g_SQLquery);

    return 
1;

4 errors in one line:
PHP код:
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 001expected token"]"but found "-identifier-"
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : warning 215expression has no effect
C
:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 001expected token";"but found "]"
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : error 029invalid expressionassumed zero
C
:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4263) : fatal error 107too many error messages on one line 
PHP код:
format(pInfo[playerid][NameGang], sizeof(pInfo[playerid][NameGang]), "%s"gName); 
Reply


Messages In This Thread
problem with saying gang name - by severance - 22.08.2018, 09:22
Re: problem with saying gang name - by severance - 22.08.2018, 09:46
Re: problem with saying gang name - by Rufio - 22.08.2018, 09:57
Re: problem with saying gang name - by severance - 22.08.2018, 10:17
Re: problem with saying gang name - by Rufio - 22.08.2018, 10:19
Re: problem with saying gang name - by severance - 22.08.2018, 10:55
Re: problem with saying gang name - by Rufio - 22.08.2018, 11:11
Re: problem with saying gang name - by severance - 23.08.2018, 11:15
Re: problem with saying gang name - by JasonRiggs - 23.08.2018, 11:27
Re: problem with saying gang name - by severance - 23.08.2018, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)