Problem with array size
#1

Problem solved by me idea.
Reply
#2

Looks like the size of TextasTD is too small/too big. You can also set string1 = string2 if they have exactly the same size. Else you have to use format.
So set the size of TextasTD to 256 and it should work.
Reply
#3

how it would look?
Reply
#4

pawn Код:
strcpy(TextasTD, string, sizeof(TextasTD));
Reply
#5

hmm..
Код:
FreeRoam/Stock.pwn(356) : error 017: undefined symbol "strcpy"
FreeRoam/Stock.pwn(356) : warning 202: number of arguments does not match definition
Reply
#6

pawn Код:
new string[128];
format(string, 128, "%s~n~%s", TextasTD, text);
TextDrawSetString(Teleportas, string);
strcat(TextasTD, string, 128);
KillTimer(LaikasTD);
LaikasTD = SetTimer("TDTeleportai" ,6000 ,false);
Reply
#7

Quote:
Originally Posted by RenisiL
Посмотреть сообщение
hmm..
Код:
FreeRoam/Stock.pwn(356) : error 017: undefined symbol "strcpy"
FreeRoam/Stock.pwn(356) : warning 202: number of arguments does not match definition
pawn Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)