Strins
#1

pawn Код:
public OnGameModeInit()
{
    new string[2][128];
    strcat(string[0],"This is ",128);
    strcat(string[1],"me you",128);
    strins(string[0],string[1],strlen(string[0]),2);
    print(string[0]);
    return 1;
}
Код:
[17:39:01] This is me you
It should be "This is me" as I put 2 in the max input string (me).

Eh?
Don't say "use strcat instead strins".
Reply
#2

What's wrong?

And you're creating 2 strings? If yes, try it this way:
pawn Код:
new string[2 char][128];
Reply
#3

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
What's wrong?

And you're creating 2 strings? If yes, try it this way:
pawn Код:
new string[2 char][128];
I suggest you to learn this:
https://sampwiki.blast.hk/wiki/Strins
Reply
#4

Looks like the maxlength parameter is ignored

Might be a bug.
Reply
#5

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Looks like the maxlength parameter is ignored

Might be a bug.
Well, then this topic should be moved to bug section.
Reply
#6

Bump this as I'm still curious.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)