# == MySQL configuration ==
host: localhost # Where the database server is located at, e.g. 'example.com', 'localhost', or '192.168.1.100'
port: 3306 # 3306 is MySQL's default port, i.e. you likely won't need to change this value
user: root
password: pass
database: skript # The database to use. Skript will automatically create a table 'variables21' in this database if it doesn't exist
# (If the table exists but is defined differently that how Skript expects it to be you'll get errors and no variables will be saved and/or loaded)
# == SQLite/CSV configuration ==
file: ./plugins/Skript/variables.db
# Where to save the variables to. For a CSV file, the file extension '.csv' is recommended, but not required, but SQLite database files must end in '.db' (SQLibrary forces this).
# The file path can either be absolute (e.g. 'C:\whatever\...' [Windows] or '/usr/whatever/...' [Unix]), or relative to the server directory (e.g. './plugins/Skript/...').
backup interval: 2 hours
# Creates a backup of the file every so often. This can be useful if you ever want to revert variables to an older state.
# Variables are saved constantly no matter what is set here, thus a server crash will never make you loose any variables.
# Set this to 0 to disable this feature.
MySQL example:
# A MySQL database example, with options unrelated to MySQL removed.
type: disabled # change to line below to enable this database
# type: MySQL
pattern: synced_.* # this pattern will save all variables that start with 'synced_' in this MySQL database.
host: localhost
port: 3306
user: root
password: pass
database: skript
monitor changes: true
monitor interval: 20 seconds
Peki Skript içinden kayıtları gönderme işlemlerini nasıl yapacağız?Evet mevcut.Config.Yml içinde bulunuyor.
Kod:# == MySQL configuration == host: localhost # Where the database server is located at, e.g. 'example.com', 'localhost', or '192.168.1.100' port: 3306 # 3306 is MySQL's default port, i.e. you likely won't need to change this value user: root password: pass database: skript # The database to use. Skript will automatically create a table 'variables21' in this database if it doesn't exist # (If the table exists but is defined differently that how Skript expects it to be you'll get errors and no variables will be saved and/or loaded) # == SQLite/CSV configuration == file: ./plugins/Skript/variables.db # Where to save the variables to. For a CSV file, the file extension '.csv' is recommended, but not required, but SQLite database files must end in '.db' (SQLibrary forces this). # The file path can either be absolute (e.g. 'C:\whatever\...' [Windows] or '/usr/whatever/...' [Unix]), or relative to the server directory (e.g. './plugins/Skript/...'). backup interval: 2 hours # Creates a backup of the file every so often. This can be useful if you ever want to revert variables to an older state. # Variables are saved constantly no matter what is set here, thus a server crash will never make you loose any variables. # Set this to 0 to disable this feature. MySQL example: # A MySQL database example, with options unrelated to MySQL removed. type: disabled # change to line below to enable this database # type: MySQL pattern: synced_.* # this pattern will save all variables that start with 'synced_' in this MySQL database. host: localhost port: 3306 user: root password: pass database: skript monitor changes: true monitor interval: 20 seconds
Nasıl yani ?Peki Skript içinden kayıtları gönderme işlemlerini nasıl yapacağız?
MySQL bağladıktan sonra nasıl veritabanından veri çekebiliriz yada yollayabiliriz?Nasıl yani ?
Lakin daha uğraştırıcı ve zaman harcanması gereken bir şey.Ben en iyisi javayla basliyim daha cok kaynak var
Öğrenmesinden bahsetmiyorum. Aynı sonuca ulaşmak Skript ile daha kolay. Tabii ki Bukkit API her zaman daha üst bir seviyede ama Skript bu sene çok fazla gelişti.C++ dan temelleri biliyorum benzerler
SonOyuncu anket skripti mi ? Daha birkaç gün önce sordum DonduranAteş o skript değil kendi kodladığımız plugin dedi.Sonoyuncudaki anket skripti icinde veritabani sart bence vardir.