11.06.2014, 19:40
(
Последний раз редактировалось thaKing; 21.08.2014 в 15:17.
Причина: Please, no!
)
Problem was fixed.
-- This post is too old!
-- This post is too old!
stock strreplace(string[], find, replace)
{
for(new i=0; string[i]; i++)
{
if(string[i] == find) string[i] = replace;
}
return string;
}
for(new i = 0; i<strlen(string); i++)
strreplace2(string[], const find[], const replace[], bool:ignorecase=true, count=cellmax, maxlength=sizeof(string)) { if(isnull(find) || isnull(string)) return 0; new matches; for(new idx, flen = strlen(find), rlen = strlen(replace), pos = strfind(string, find, ignorecase); pos != -1 && idx < maxlength && matches < count; pos = strfind(string, find, ignorecase, idx)) { strdel(string, pos, pos + flen); if(rlen) strins(string, replace, pos, maxlength); idx = pos + rlen; matches++; } return matches; }
why use the "stock" word when you can use public. Go check out the pawn language pdf. Or SAMP Wiki explains it well.
https://sampwiki.blast.hk/wiki/Stocks You're writing a stock, which will be used. Correct? You're using it incorrectly (my opinion) |
stock Myfunction()
public Myfunction()
function Myfunction()
Myfunction()