Skocz do zawartości
  • 0

Norbiros

Pytanie

Witam. To jest mój config.sk

		# ==== Variables ====
		
databases:
	MySQL:
		type: MySQL
		pattern: www_.*
		host: mysql.titanaxe.com
		port: 3306
		user: srv129067
		password: HASŁO 
		database: skript
		table: variables
		monitor changes: true
		monitor interval: 20 seconds
		
	default:
		# The default "database" is a simple text file, with each variable on a separate line and the variable's name, type, and value separated by commas.
		# This is the last database in this list to catch all variables that have not been saved anywhere else.
		# You can modify this database freely, but make sure to know what you're doing if you don't want to loose any variables.
		
		type: CSV
		
		pattern: .*
		
		file: ./plugins/Skript/variables.csv
		
		backup interval: 2 hours
		
		# PS: If you don't want some variables to be saved in any database (e.g. variables that contain an %entity% which usually despawn when the server is shut down)
		# you can modify the last database's pattern to not match all variables, e.g. use '(?!x_).*' to match all variables that don't start with 'x_'.
		# Be very cautious when doing this however as unsaved variables cannot be recovered after the server has been stopped.
		# I recommend to use a single character to denote unsaved variables (similar to local variables' '_'), e.g. '-', in which case the last database's pattern should be '(?!-).*'.
		
		
		

I teraz. Jak to ma wyglądać? Chcę jakoś zapisywać do mysql dane. Widzę że każda zmienna msui zaczynać się od www_ więc jak zrobić aby się tam zapisywało. W takim stylu?:

on load:
    set {www_zmienna} to 11

I pojawi się to w mySql? I jak odczytywać taką zmienną, tak?

send "Zmienna: %{www_zmienna}%"

Mi nie działa.... I czy dobrze mam ustawiony config?

Oto moje dane:

Host (adres serwera)	mysql.titanaxe.com
Port	3306
Baza i użytkownik	srv129067
Hasło UKRYTE HASŁO (poradzę sobie w przepisaniu :D)

 

Edytowane przez Norbiros
Odnośnik do komentarza
https://skript.pl/temat/49519-pomoc-z-mysql/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
4 godziny temu, Norbiros napisał:
pattern: www_.*

Nie interesowałem się bazą danych w Skripcie, ale czysto logicznie jak byk pisze, że pattern to www_.*, kiedy zmienna ma www_*.
Aczkolwiek nie wiem, może kropka nic nie znaczy w tym configu, po prostu moje przypuszczenia.

Odnośnik do komentarza
https://skript.pl/temat/49519-pomoc-z-mysql/#findComment-307156
Udostępnij na innych stronach

  • 0

Wsensie wydawało mi się że jak masz normalną listę {lista::*} to oznacza kilka elementów... więc gwiazdka znaczy to po.. Czyli myślisz żeby zmienne robić w stylu {www_.zmienna}? Lub (www_.zmienna*}?

 

Edytowane przez Norbiros
Odnośnik do komentarza
https://skript.pl/temat/49519-pomoc-z-mysql/#findComment-307158
Udostępnij na innych stronach

  • 0
12 godzin temu, Norbiros napisał:

Wsensie wydawało mi się że jak masz normalną listę {lista::*} to oznacza kilka elementów... więc gwiazdka znaczy to po.. Czyli myślisz żeby zmienne robić w stylu {www_.zmienna}? Lub (www_.zmienna*}?

 

Gwiazdka na pewno znaczy, że tam cokolwiek. Ale spróbuj z kropką xD

Odnośnik do komentarza
https://skript.pl/temat/49519-pomoc-z-mysql/#findComment-307177
Udostępnij na innych stronach

  • 0

 

Znalazłem to:

Cytat

# Defines which variables to save in this database.
        # This pattern uses Regex syntax, e.g. use 'db_.*' (without the quotes) to store all variables prefixed with 'db_' in this database,
        # or use '.*' (the default value) to store all variables here (recommended for the last database in this list, as otherwise some variables might not be saved).
        # Please note that variables are only stored in one database, and databases are checked from top to bottom,
        # e.g. if a variable matches the topmost database's pattern it will be saved there and nowhere else.
        # BTW: Patterns are checked in a separate thread, i.e. your server likely won't run slower when using complicated patterns.

I w dodatku. W mySql, nie tworzą się:

Database: skript,

Tabela: variables

Myślałem że się same tworzą... ALe może trzeba samemu je stworzyć a skript będzie zapisywał?

 

PS: Kropka nie pomogła...
 

Edytowane przez Norbiros
Odnośnik do komentarza
https://skript.pl/temat/49519-pomoc-z-mysql/#findComment-307178
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...