How do i set the value of a string to null
#1

I have variables which stores the name and ip of a player

Код:
PlayerInfo[playerid][PlayerName]
PlayerInfo[playerid][IP]
When a player connects, i store the playername and ip in those variables

How can i clear the variable onplayerdisconnect

Can i just do
Код:
PlayerInfo[playerid][PlayerName] = '\0'
PlayerInfo[playerid][IP] = '\0'
Thanks!
Reply
#2

Why would you divide that by 0? just set it to 0?

E.G:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
   PlayerInfo[playerid][PlayerName] = "None" or 0
   PlayerInfo[playerid][IP] = "None" or 0
}
Why wouldn't you do that?
Reply
#3

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Why would you divide that by 0? just set it to 0?
That wasn't a zero!
It is the null character
Reply
#4

Then just make it as "None".

**Edited my previous post**
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)