Quote:
Originally Posted by UberSocks
Quote:
Originally Posted by sizeof(Sky));
Quote:
Originally Posted by UberSocks
What would you define as something 'Where it's not needed'?
Forgive me but I'm a beginner. Just started using strings recently.
But yes, my script does use a lot of [256] strings.
|
Sorry for the double-post, but apparently my post has received the max-length, lol.
What types of commands have the [256] strings? Can you list them? (Don't copy-paste the whole command, just the syntax for it. E.G: /SetHP <Player ID/Part of Name> <Amount>)
|
My script is MySQL integrated, so I have used a lot of strings to send and receive data from the database such as queries etc. From skimming through the code, I have noticed that a lot of strings are used to display server information in the console, to which I have logged for several purposes.
For example, this is when a player has typed /deleteitem <Slot Number>
Code:
new query[256];
ConnectToDatabase();
if(PlayerItemsInfo[playerid][slotid][piSQLId] != INVALID_SQL_ID)
{
format(query,sizeof(query),"DELETE FROM players_items WHERE id=%d",PlayerItemsInfo[playerid][slotid][piSQLId]);
if(mysql_query(query))
{
printf(" SQL: %s",query);
The only string throughout this part is query[256], and as you can see, is used to print in the server console. There are many alike throughout the entire script. Although there are others which have a different purpose in the script, they are basically used to call and receive information from the database.
|
Yikes, I am not good with MySQL, haha. MySQL-wise, i'm actually not sure if you have to use that much of a string in order to send and receive the information; Sorry mate.