Pickups / Arrays
#1

What is more efficient when making pickups and textdraws, enter and exit commands.

Case Statements or If statements?

If case statement how would I be able set the pickups to an array and, well, as you can tell I have no clue what to do.. I can do it but, I need a few examples..

I have also seen people create pickups through the MySQL, I find this more strenuous on the server in theory so if someone could explain why some people do that for me it would be appreciated, cheers.

- Karner
Reply
#2

Quote:
Originally Posted by vIBIENNYx
Посмотреть сообщение
What is more efficient when making pickups and textdraws, enter and exit commands.

Case Statements or If statements?

If case statement how would I be able set the pickups to an array and, well, as you can tell I have no clue what to do.. I can do it but, I need a few examples..

I have also seen people create pickups through the MySQL, I find this more strenuous on the server in theory so if someone could explain why some people do that for me it would be appreciated, cheers.

- Karner
I don't see why you would use a case (switch) statement for making pickups, textdraws, enters, and exits. Switch statements are better to use to check the value of an integer multiple times.

The reason people create pickups through MySQL is so that they don't have to restart the server to add new pickups. It's not more strenuous on the server except while loading and saving, which isn't done very often. If you have a local MySQL database, then it won't really affect much.
Reply
#3

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
I don't see why you would use a case (switch) statement for making pickups, textdraws, enters, and exits. Switch statements are better to use to check the value of an integer multiple times.

The reason people create pickups through MySQL is so that they don't have to restart the server to add new pickups. It's not more strenuous on the server except while loading and saving, which isn't done very often. If you have a local MySQL database, then it won't really affect much.
Sorry, I should expand what I meant.

For /enter's and /exits (On the command code itself)

Would it be better to do an if statement for each seperate one or a case statement to save code and plausibility, the only issue is how to make it into a case statement.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)