27.01.2014, 13:20
Quote:
|
This looks good, just a couple remarks. It is common practice to write definitions in UPPERCASE and all other variables (ID, VIP) in lowercase or CamelCase. The other thing; I don't really consider it useful creating tables from within the script. This will most likely only ever be executed once in the lifetime of the server. Lastly, only select the fields you will actually need instead of using the '*' selector. In you account check function, for example, you only use the password.
|
Would you feel fine if a downloaded gamemode needs 10 tables, where every table has more than 10 columns, to create them by hand?
Should the author of the gamemode write a manual about how the tables should be named, which column has which name, content-type (int, float, text, byte, ...), instead of adding a line of code which will be used only once, as you said?
I'd rather have the gamemode create them in such a case, even if that code is executed only once.
Then everyone is certain they have the proper table-name and table-structure and don't have to fiddle around trying to get all tables created manually and testing if the script works using your manually created table.
I created a table with 35 columns a few days ago and it took a while to set it up.
Nice tutorial btw, I'll be using this.


