Problem with code...
#1

Hello again, I have a problem:
above all, I have this: #define strcpy(%0,%1,%2) %0[0]=0;strcat(%0,%2,%1)
the error is in this line:
strcpy (CuentaInfo [playerid] [cuPremium], 64, GetCuentaData (playerid, "Premium"));
And these are the errors ...
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : warning 215: expression has no effect
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : error 001: expected token: "", pero found "["
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : error 029: invalid expression, assumes zero
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : warning 215: expression has no effect
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : error 001: expected token: "", pero found "]"
C: \ Users \ Benny \ Desktop \ OSRP 2 \ pawno \ include \ cuentas.inc (328 ) : fatal error 107: too many error messages on one line
Function:
Код:
GetCuentaData(playerid, campo[])
{
   print("Inicio de GetCuentaData...");
    new tmp[128];
    new row[60];
    format(tmp, 128, "SELECT %s FROM cuentas WHERE Nombre = '%s' LIMIT 1", campo, pNameEx(playerid));
    mysql_query(tmp);
    mysql_store_result();
    mysql_fetch_row(row);
    mysql_free_result();
    return row;
}
The premium field is not a string, but if I put just CuentaInfo [playerid] [cuPremium] = GetCuentaData (playerid, "Premium") shows this error: Error 006: Must Be Assigned to an array
I hope you can help me: S

edit: Ops fail! I wrote it in Spanish instead of English XD sorry!
Reply


Messages In This Thread
Problem with code... - by Narxon - 09.05.2011, 13:45
Re: Problem with code... - by coole210 - 09.05.2011, 15:23
Re: Problem with code... - by Vince - 09.05.2011, 15:55
Re: Problem with code... - by MadeMan - 09.05.2011, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)