[Include] [INC] strlib v1.3 - Simple string modification (Update: 21/10/09)
#41

Код:
printf("%s %s %s", dest[0], dest[1], dest[2]);
Reply
#42

Quote:
Originally Posted by ball
Посмотреть сообщение
Код:
printf("%s %s %s", dest[0], dest[1], dest[2]);
IK that, but PHP's version of same code works fine:

PHP код:
$source "123,456,789";
$dest explode(","$source);
printf("%s %s %s"$dest[0][1], $dest[0][2], $dest[1][2]); 
Result:

Quote:

2 3 6

So I think there's a bug...
Reply
#43

Quote:
Originally Posted by Yousha
Посмотреть сообщение
IK that, but PHP's version of same code works fine:

PHP код:
$source "123,456,789";
$dest explode(","$source);
printf("%s %s %s"$dest[0][1], $dest[0][2], $dest[1][2]); 
Result:



So I think there's a bug...
Does PAWN spell 'PHP'?
Reply
#44

Quote:
Originally Posted by Kar
Посмотреть сообщение
Does PAWN spell 'PHP'?
Get out, spammer.

Quote:
Westie: Missed PHP's excellent string modification functions? Yeah, but that was because it was easy.

Reply
#45

Quote:

[22:17:28] [debug] Run time error 10: "Native function failed"
[22:17:28] [debug] strins
[22:17:28] [debug] AMX backtrace:
[22:17:28] [debug] #0 00000930 in str_ireplace (sSearch[]=@0031fbb0 ",Test", sReplace[]=@002864f0 "", sSubject[]=@00101d0c "Test,Test,Test,Test,Test,", &iCount=@00316ad8 2) at J:\Desktop\PAWN\SA-MP\X\pawno\include\strlib.inc:124

strlib.inc version: 1.3.0

Код:
#define _strlib_med_string 256

new sTemp[128], sReturn[_strlib_med_string];
// ...
strins(sReturn, sReplace, iIndex, iLengthReplace); // Line #124
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)