Copying strings (strcpy) - GAHHHHH
#1

I've made a couple of topics about this before, but here's another one.

I have an enum array of strings, like so

enum enumlol
{
string[64]
}

new array[MAX_PLAYERS][MAX_DIALOGS][enumlol];

and I'm trying to copy the string from

array[0][1][0]

in to

array[0][0][0]

but it's not working properly. I haven't done much debugging, but from what I can tell it's just setting the string to ""

Are there any alternatives to strcpy?

EDIT:

pawn Код:
enum testvars
{
    teststring[64]
}

new test[testvars];


new hsdfghlsdgh[128];
strcpy(test[teststring], "Hello World!");
format(hsdfghlsdgh, 128, "%s", test[teststring]);
SendClientMessage(playerid, -1, hsdfghlsdgh);
It outputs a blank clientmessage...
Reply
#2

pawn Код:
format(array[0][0][0], sizegoeshere, "%s", array[0][1][0]);
Can you please explain in details?
Reply
#3

Thanks for clearing that up ******, can't tell you how much of a weight that is off my shoulders!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)