Quote:
Originally Posted by Asdito´^
PHP Code:
public client_connect(id) { new szName[32] // get_user_name(id, szName, 31)// ArraySetString(topaso, id, szName) }
seguro el debug te habra tirado index out bounds
|
Nono, eso esta bien... solo que esta usando una celda de mas, al pedo... pero no esta mal.
Igual ahora que lo veo los parametros que uso en ArrayGetString y ArraySetString estan mal...
Code:
/**
* Returns a string value from an array.
*
* @param which The array to retrieve the item from.
* @param item The item to retrieve (zero-based).
* @param output The variable to store the value in.
* @param size Character size of the output buffer.
*/
native ArrayGetString(Array:which, item, output[], size);
/**
* Sets an item's data with that of a local buffer.
* The buffer size must match what the cellsize that the array was created with!
* The item must already exist, use ArrayPushArray to create a new item within the array.
*
* @param which The array to set the item from within.
* @param item The item to set (zero-based).
* @param input The input buffer to store.
*/
native ArraySetArray(Array:which, item, const any:input[]);
No se por que en el segundo parametro pusiste la id XD... si no necesitas la id del player para guardar datos dentro de una variable.
Lo que tenes que hacer crear una variable global e ir aumentando esa variable en el client connect. (esa variable seria el parametro "item").
__________________