diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-01-16 20:04:57 -0500 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-01-16 20:04:57 -0500 |
| commit | 93c55ed064591eb4b6f582f09adfe27e6af3c05e (patch) | |
| tree | 4354bdb4f8b6ddb9361c82b59e376de1d4d9b7b7 | |
| parent | 454f358ec297a025867778550a1ad7e6b0ec6a44 (diff) | |
| download | artery-93c55ed064591eb4b6f582f09adfe27e6af3c05e.tar.gz artery-93c55ed064591eb4b6f582f09adfe27e6af3c05e.tar.bz2 artery-93c55ed064591eb4b6f582f09adfe27e6af3c05e.zip | |
Changes from trial setup
Error for users that don't have mysqloo set up
Added note in tutorial that pac3 needs to be installed server side
| -rw-r--r-- | gamemode/config/sv_sql.lua | 14 | ||||
| -rw-r--r-- | tutorials/tut000_setup.md | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/gamemode/config/sv_sql.lua b/gamemode/config/sv_sql.lua index 44e76ff..a4b5daa 100644 --- a/gamemode/config/sv_sql.lua +++ b/gamemode/config/sv_sql.lua @@ -12,8 +12,22 @@ local parse = { ["Preferred_module"] = tostring, [""] = function() return nil end } +local default_file = [[ +EnableMySQL=true +Host=localhost +Username=root +Password=root +Database_name=artery +Database_port=3306 +Preferred_module=mysqloo +]] local mysqlconfig = file.Read("artery/mysql.txt") +if not mysqlconfig then + file.Write("artery/mysql.txt",default_file) + error("No sql setup defined, a default config has been given. edit garrysmod/data/artery/mysql.txt to configure it.") +end + for _,line in pairs(string.Explode("\n",mysqlconfig,false)) do local key, value = unpack(string.Explode("=",line,false)) assert(parse[key],string.format("SQL field unknown:%q known fields:\n\t%s",key,table.concat(table.GetKeys(parse),"\n\t"))) diff --git a/tutorials/tut000_setup.md b/tutorials/tut000_setup.md index 05060f2..6d7fc55 100644 --- a/tutorials/tut000_setup.md +++ b/tutorials/tut000_setup.md @@ -16,8 +16,9 @@ First, you'll need to download the Artery gamemode base. This can be done for up 6. Clone the repository `git clone http://cogarr.net/source/cgit.cgi/artery` 7. Go back one level, then into your addons directory and clone the artery_editor addon (`cd ../addons` then `git clone http://cogarr.net/source/cgit.cgi/artery_editor`) 8. Another one `git clone https://cogarr.net/source/cgit.cgi/zones` _*_ Please note that this is a fork of [bobleheadbob's original api](https://github.com/Luabee/Zones), all it does is put the files into an addon format. -9. Finally, be sure you are subscribed to PAC3 on the steam workshop -10. Boot up gmod, select the artery addon, and load into gm_flatgrass to make sure it works! You can skip the next section, and go on to the next tutorial. +9. Another one `git clone https://github.com/CapsAdmin/pac3.git` +10. Finally, be sure clients are subscribed to PAC3 on the steam workshop +11. Boot up gmod, select the artery addon, and load into gm_flatgrass to make sure it works! You can skip the next section, and go on to the next tutorial. ## Non-git setup |
