How can I set null a string?
#1

Hello guys. I made a stat command and it shows the text that it's attached to a player. But if I delete the label it still appears the text on the stat command. How can I set it to "" (null).
pawn Код:
// OnCreatingLabel
UserData[ id ][ PLAYER_TAG_TEXT ] = Txt;
pawn Код:
// OnDeletingLabel
UserData[ id ][ PLAYER_TAG_TEXT ] = ""; // Error Line
The error
pawn Код:
error 047: array sizes do not match, or destination array is too small
How can I fix it. I can't think anything else right now.
Reply
#2

pawn Код:
UserData[ id ][ PLAYER_TAG_TEXT][0] = '\0';
or
UserData[ id ][ PLAYER_TAG_TEXT][0] = EOS;
Reply
#3

Thank you TheKiller, I totally forgot that!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)