SA-MP Forums Archive
GPCI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GPCI (/showthread.php?tid=580744)



GPCI - STONEGOLD - 07.07.2015

PHP код:
    new playerserial[128];
    new 
gpcii gpci(playerid,playerserial,sizeof(playerserial));
    
pData[playerid][pGPCI] = gpcii;
            
        
format(querysizeof(query), "UPDATE `players` SET " );
        
        
format(tmpsizeof(tmp), "`GPCI`=%s, "pData[playerid][pGPCI] );
        
strcat(querytmp); 
not working because of %s. Any idea? i m trying to saving player gpci every last login so it keep updates every time player will quit games


Re: GPCI - nickdodd25 - 07.07.2015

Missing '' in your query string. Change your format line to this...
pawn Код:
format(tmp, sizeof(tmp), "`GPCI`= '%s', ", pData[playerid][pGPCI] );
And it should work now.


Re: GPCI - STONEGOLD - 07.07.2015



it looks like this here.


Re: GPCI - Jefff - 07.07.2015

gpci is a string
pawn Код:
new playerserial[50];
gpci(playerid,playerserial,sizeof(playerserial));

// pGPCI in enum should be a string too, pGPCI[50]

pData[playerid][pGPCI] = playerserial;

format(query, sizeof(query), "UPDATE `players` SET `GPCI` = '%s' WHERE something = something", playerserial, some array here);



Re: GPCI - STONEGOLD - 07.07.2015

Well, I am using stract. any help?


Re: GPCI - Stev - 07.07.2015

Still the same concept with or without strcat..