Ayuda con este warning....
#1

Buenas a Todos, es Simple, me tira este warning cuando coloco un strcat en un stock, que sucede?.

pawn Код:
stock funcion(test1[], test1max, test2[]) {
    format(test1, test1max, "Texto");
    strcat(test1, test2); //warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
}
pawn Код:
new string1[128], string2[128];
funcion(string1, 128, string2);
ShowPlayerDialog(playerid,ID, DIALOG_STYLE_LIST, "Titulo", string1, "Seleccionar", "Cancelar");
Desde ya muchas Gracias.
Reply
#2

Tal ves te ayuda Click Acahttps://sampforum.blast.hk/showthread.php?tid=115017
Reply
#3

Код:
strcat(dest[], const source[], maxlength=sizeof string)
pawn Код:
stock funcion(test1[], test1max, const test2[])
Deberнa funcionar.
Reply
#4

Quote:
Originally Posted by [J]ulian
Посмотреть сообщение
Код:
strcat(dest[], const source[], maxlength=sizeof string)
pawn Код:
stock funcion(test1[], test1max, const test2[])
Deberнa funcionar.
eso fuel o primero ke intente, y cuando coloco const me tira error:
error 035: argument type mismatch (argument 1) en la linea anterior.

:S
Reply
#5

te tira error porque no usas test2, de ultima le pones test2[] = " "
Reply
#6

quй se supone que hace de diferente esa funciуn a usar strcat directamente?

pawn Код:
stock funcion(test1[], test1max, test2[],testmax2=sizeof(test2)) {
    format(test1, test1max, "Texto");
    strcat(test1, test2,testmax2); //warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
}
Reply
#7

Quote:
Originally Posted by Daniel-92
Посмотреть сообщение
quй se supone que hace de diferente esa funciуn a usar strcat directamente?

pawn Код:
stock funcion(test1[], test1max, test2[],testmax2=sizeof(test2)) {
    format(test1, test1max, "Texto");
    strcat(test1, test2,testmax2); //warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
}
hay esta , era eso .

Gracias. y la funcion es para abreviar la funcion es un menu en dialog y lo abrevie en una linea
hay funciono perfecto y entendi .

Muchas Gracias, Saludos .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)