SA-MP Forums Archive
Set a string in a variable. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Set a string in a variable. (/showthread.php?tid=195107)



Set a string in a variable. - Biesmen - 01.12.2010

I wonder if it's possible to set a string in a variable.

Something like this,
pawn Код:
Message[playerid] = "Message!";
I'm trying to look for a way to use this, but I actually do not know how.

So, if you feel like helping me, feel free to do so.


Re: Set a string in a variable. - SkizzoTrick - 01.12.2010

Did yout try it?


Re: Set a string in a variable. - Biesmen - 01.12.2010

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
Did yout try it?
Yep, it gave the following error:
Код:
error 047: array sizes do not match, or destination array is too small
But, it's solved now. I didn't set the size to 255. Anyway, thanks for trying. o.o
(Stupid me *facepalm*)


Re: Set a string in a variable. - Sinner - 01.12.2010

If you're trying to make a string for each playerid you will need a multidimensional array


Re: Set a string in a variable. - Biesmen - 01.12.2010

Nah, that script was an example. I won't use that ofcourse.

Since I'm posting already, if you feel like you could also take a look at my other help thread, I couldn't find a solution: https://sampforum.blast.hk/showthread.php?tid=194901