Posts: 14
Threads: 4
Joined: Apr 2011
Reputation:
0
Ok, so IsPlayerConnected work in OnPlayerDisconnect? I think its unnecessary?
I wish to lower the ammount of unnecessary big strings. But if i need string with more than 128, assuming 2000? It will work without that "debug-info" or?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
The code above isn't checking to see if they are only connected to the server, it is also seeing if they have logged into an account and need to have some data saved or not! So no, it isn't unnecessary.
In regards to the big strings, I have used 2000 in the past w/o issues, but I would strongly advise against it!
Posts: 14
Threads: 4
Joined: Apr 2011
Reputation:
0
Okay, thanks. I didnt know that IsPlayerConnected will work in OnPlayerDisconnect (because he is leaving).
I must use 500, 1000 and sometimes 2000 for dialogs. I dont know will they show "debug-info" which indicates too many strings? Or it just shown when i use big string when unnecessary?
Posts: 14
Threads: 4
Joined: Apr 2011
Reputation:
0
For text-defines - no problem, i saw and read that topic long time ago.
But, dialogs is the problem. Also, "private-message" text is sometime not enough to fit into 128 string, so i set string 200 for that. Dialogs and formating another big things is the problem, because i cant calculate how much i need (it depend on online-users, etc). Also for the car-spawn dialog list etc...
And, is using a big strings a huge problem?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I wouldn't say it's a huge problem, no. You should be okay using a few larger-strings here and there. It's just a bad coding practice IMHO, but you have to do what you have to do!
You mentioned PM's being longer than 128 characters... Keep in mind that the text-area can only support a total of 128 characters per each time you use SendClientMessage(). So, supporting 200 cells is useless as 72 cells would never be used.