SA-MP Forums Archive
strcpy always storing empty string - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: strcpy always storing empty string (/showthread.php?tid=414850)



strcpy always storing empty string - T0pAz - 10.02.2013

I have this weird problem lately when I switched to strcpy from format for copying strings. It always stores empty string. Here's the code FYI:

pawn Код:
#define MAX_ITEM_NAME           (24)

enum itInfo
{
    itName[MAX_ITEM_NAME],
    ...
}

stock ItemCreate(itemName[], ...)
{
    ...
    strcpy(ItemInfo[itemid][itName], itemName, MAX_ITEM_NAME);
    ...
}
Any help would be appreciated.