I have changed to :
PHP Code:
public get_data_forcmd(client){
if (db != INVALID_HANDLE)
{
decl String:steamId[64];
GetClientAuthString(client, steamId, sizeof(steamId));
strcopy(steamIdSave[client], sizeof(steamIdSave[client]), steamId);
decl String:buffer[250];
Format(buffer, sizeof(buffer), "SELECT mdp FROM vip_membres WHERE steamid = '%s'", steamIdSave[client]);
PrintToChat(client, "Votre SteamId : %s", steamIdSave[client]);
if(DEBUG == 1){
PrintToServer("DEBUG: Action:initPlayerBase (%s)", buffer);
}
SQL_TQuery(db, SQLDataLoad, buffer, client);
}
But i have now a lot of errors :
- error 001: expected token: "]", but found "-identifier-" (line : strcopy(steamIdSave[client], sizeof(steamIdSave[client]), steamId); ) x2
- error 029: invalid expression, assumed zero (idem line)
fatal error 127: too many error message on one line
Quote:
Originally Posted by berni
You can't copy arrays like this, you have to use strcopy to copy a String.
Why did put this in ( ) ? You only have to put a ; at the end.
|
__________________