Set a string to another 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: Set a string to another string (
/showthread.php?tid=568718)
Set a string to another string -
Sellize - 24.03.2015
I am trying to set the
mBagLoc string to
position but it gives me this error.
Код:
error 047: array sizes do not match, or destination array is too small
PHP код:
public createMBag(Float:x, Float:y, Float:z, position[])
{
mBagLoc = position; // Set the mBagLoc string to the specified position so that we can refrence it later
Re: Set a string to another string -
Misiur - 24.03.2015
pawn Код:
#define strcpy(%0,%1) \
strcat((%0[0] = '\0', %0), %1)
//(...)
strcpy(mBagLoc, position);