create null 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: create null string. (
/showthread.php?tid=477683)
create null string. -
audriuxxx - 25.11.2013
Hi,
Код:
strmid(WROTE[ playerid ],"",0,50,50);
If i do that, WROTE[ playerid ] variable will be null?
Re: create null string. -
Jefff - 25.11.2013
use simply
pawn Код:
WROTE[ playerid ][ 0 ] = '\0';
Re: create null string. -
audriuxxx - 25.11.2013
It's doesn't work. I get error, this variable must by index ....
Re: create null string. -
Konstantinos - 25.11.2013
You're supposed to use it as 2D array (for the lenght).
Let's say:
pawn Код:
new
WROTE[ MAX_PLAYERS ][ 100 ]
;
// An array for each player that can store a text.
Where you want to make it NULL/empty:
pawn Код:
WROTE[ playerid ][ 0 ] = '\0';
// OR
WROTE[ playerid ][ 0 ] = EOS;