problem with saying gang name
#2

PHP код:
CMD:creategang(playeridparams[])
{
    new 
gName[100], 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, '%e', '%e') LIMIT 1"gNamePlayerName[playerid]);
     
mysql_tquery(g_SQLquery);
     
     
pInfo[playerid][NameGang] = gName;
     
pInfo[playerid][OwnerGang] = PlayerName;
     
     
     
     
format(stringsizeof(string), "You created: '%s'"gName);
     
SendClientMessage(playerid, -1string);
    
pInfo[playerid][GangID] = 1;
    
      
mysql_format(g_SQLquerysizeof query"UPDATE `players` SET `idgang` = '1' WHERE `id` = '%d' LIMIT 1"pInfo[playerid][ID]);
      
mysql_tquery(g_SQLquery);
    
    return 
1;

Tried making something like this, but it gives errors about strings


PHP код:
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4256) : error 006must be assigned to an array
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(4257) : error 006must be assigned to an array 
4256 and 4257:

PHP код:
     pInfo[playerid][NameGang] = gName;
     
pInfo[playerid][OwnerGang] = PlayerName
How do you make it to work, gName is already defined under array and PlayerName too.
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: 2 Guest(s)