[Ajuda] strlen e sizeof - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] strlen e sizeof (
/showthread.php?tid=458624)
strlen e sizeof -
Juniiro3 - 17.08.2013
Queria saber se tem como usar strlen no lugar de sizeof, tipo:
format(Dados[playerid][Senha], sizeof(Dados[playerid][Senha]), "%s", inputtext);
OU
format(Dados[playerid][Senha], strlen(inputtext), "%s", inputtext);
Re: strlen e sizeof -
darkxdll - 17.08.2013
Eu testei aqui e nгo deu erros '-'.
Acho que pode...
Re: strlen e sizeof -
Juniiro3 - 17.08.2013
Consegui resovler o problema, vlw ai dark.
Й que por algum motivo desconhecido usando sizeof dava uns erros '-' usando strlen nгo deu e o resultado pelo debug foi o mesmo.
Re: strlen e sizeof -
Don_Speed - 17.08.2013
pawn Код:
format(Dados[playerid][Senha], 50, inputtext);
Eu vi que vocк resolveu , mas e legal deixar postado a soluзгo para o s novatos nгo criarem sobre o mesmo erro!
Re: strlen e sizeof -
Juniiro3 - 17.08.2013
Ah ok. No meu caso a soluзгo foi:
pawn Код:
format(Dados[playerid][Senha], strlen(Dados[playerid][Senha]), "%s", inputtext);
OBS: eu usei isso na DialogResponse do registro.