Stránka 1 z 1

Chyba u seznamu nejbohatších

Napsal: 01 úno 2013, 22:59
od 007100
Dole

Chtěl bych si dát seznam nejbohatších a píše to chybu, ZDE

Config iConomy

Spoiler: zobrazit
# iConomy 6.0.8b
# @author Nijikokun <nijikokun@gmail.com>
# @license GPLv2
# @copyright Copyright AniGaiku LLC (C) 2010-2011
##
# Setup Notes
# - Seconds
# Basic Table:
# 1 minute = 60 seconds
# 1 hour = 1 minute * 60 = 3600 seconds
# 1 day = 1 hour * 24 = 86400 seconds
# 1 week = 1 day * 7 = 604800 seconds
# - Database
# Do not use remote databases from free sites, please use either a
# remote database from a personal hosted VPS or DEDI or a local
# database. This will prevent any 'timeout' or 'invalid settings'
# or 'cannot connect to database' issues. Thank you :)!
##

System:
Permissions:
Use:
# Should a user have the 'iConomy.holdings' to use /money
# By default this is false, so that people stop complaining that
# iConomy doesn't work. Yes, people actually report that.
# If you are one of those people, leave this false.
Holdings: false

Default:
Currency:
# Major is the first segment [Major].Minor

# Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
Major: [ 'Dollar', 'Dollars' ]

# Minor (Major.[Minor]) 0.23 Coins (With Seperate 0 Dollars, 23 Coins)
Minor: [ 'Coin', 'Coins' ]

Account:
# Default account balance when created
Holdings: 30.0

# Controls how money is formatted through methods
Formatting:
# Minor allows you to use the Minor amounts for amounts <1
# Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
Minor: false

# Seperate allows your money to be shown in an alternative way,
# instead of 1.32 it will show as 1 Dollar 23 Coins
# !!! NOTICE: This only works if Minor is set to true !!!
Seperate: false # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)

# Single shows your money in another alternative way.
# Instead of 1.23 Dollars you will see: 1 Dollar.
# If your money is 0.23 you will see 0 Dollars if Minor is false, 23 Coins if Minor is true.
# !!! Notice: This overrides seperate !!!
Single: false

# Logs all monetary transactions passed through iConomy
Logging:
Enabled: false

# Purges Default Balances at Loading
# Good way to keep unused accounts or default accounts wiped out and lower database usage.
Purging:
Enabled: true

# Controls amount of money gained at a set interval.
Interest:
Enabled: false

# Only give interest to players who are currently online?
Online: true

Announce:
# Send a message when the player gains interest?
Enabled: false

Interval:
# Interval is done in seconds, here is a easy reference table for commonly set intervals:
# 1 minute = 60 seconds
# 1 hour = 1 minute * 60 = 3600 seconds
# 1 day = 1 hour * 24 = 86400 seconds
# 1 week = 1 day * 7 = 604800 seconds
Seconds: 60

Amount:
# The balance to be met where we stop giving interest.
# 0.0 for no limit
Cutoff: 0.0

# Percentage of holdings to give / take (Negative to take) (Overrides Min/Max)
Percent: 0.0

# This is range based, to set a "flat" or "constant" rate, set each (Maximum and Minimum) to the same number.
# If the two numbers are different, it will be a random amount in-between the two.
Maximum: 1
Minimum: 2

Database:
# Databases Supported:
# Flatfile, FF, mini, minidb
# - These all equate to miniDB
##
# item, items, inventory, inventoryDB
# - These all equate to InventoryDB, which uses inventory for storage
##
# xp, exp, orb, xpdb, expdb, orbdb
# - These all equate to ExperienceDB, which relies on Experience for balance.
##
# mysql, mysqldb
# - These will attempt to connect to MySQL
##
# sqlite, sqlite2, sqlite3, sqlitedb
# - These will attempt to create & connect to SQLite
##
# postgre, postgreSQL, postgreDB
# - These will attempt to connect to PostgreSQL
Type: 'minidb'

# These are for InventoryDB only.
#
# InventoryDB is essentially Physical Money.
# It isn't logged in a database, its based on the users inventory
# and the two items selected below.
#
# MajorItem is the item or block ID of the major currency
# MinorItem is the item or block ID of the minor currency
# e.g. MajorItem: 266, MinorItem: 265 for Gold/Iron
MajorItem: 266
MinorItem: 265

# This controls the database name, by default it is iConomy
Table: 'iConomy'

# URL is for SQL Databases Only
##
# Path to iConomy folder is easy, it's the COMPLETE path.
# (Mine) G:\MineCraft\plugins\iConomy\
# Won't be the same as yours, but it usually looks like that.
##
# [H2DB Default] h2:path/to/iConomy/folder/iConomy;AUTO_RECONNECT=TRUE
# [SQLite Default] sqlite:path/to/iConomy/folder/iConomy.db
##
# Binary Databases use ip:port style connections.
# ip
# - is the connection identifier (internet protocol)
# - for ipv6 usually encased in brackets [::1]
# port
# - the port that the database is listening on
# - defaults: 3306 for mysql, postgre is either 5740 or 5432
##
# [MySQL Default] mysql://localhost:3306/iConomy
# [Postgre Default] postgresql://localhost:5740/iConomy
URL: 'mysql://localhost:3306/'

# Login details for binary databases
Username: '109417_mysql_db'
Password: '*****'

##############################################################
# !!! Conversion is not your database settings !!!
##############################################################
# Conversion allows you to convert your old 5.x to the new 6.x
# All is currently unused.
##############################################################
# URL is for MySQL only, H2DB doesn't use it.
##############################################################
Conversion:
# Set to True, After converting, change this back to false!
Enabled: false

# Database Type, H2DB or MySQL
Type: 'MySQL'

# Database Table
Table: 'iConomy'

# Database URL without table at the end.
URL: 'mysql://gimli.fakaheda.eu:3306/109417_mysql_db'

# Username / Password
# H2DB does not use this. MySQL Only.
Username: '******'
Password: '*****'

# Unused ATM.
All: true


Script na webu

Spoiler: zobrazit
<?
header('Content-Type: text/html; charset=utf-8');
?>
<html>
<head>
<meta http-equiv="Content-Language" content="cs">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>iConomy list v1.0</title>
</head>
<body>
<?
// change these things

$server = "gimli.fakaheda.eu";
$dbuser = "109417_mysql_db";
$dbpass = "trololol";
$dbname = "109417_mysql_db";

mysql_connect($server, $dbuser, $dbpass);
mysql_select_db($dbname);

$result = mysql_query("SELECT * FROM iConomy ORDER BY balance DESC LIMIT 0, 5");

echo " <table width=20% border=1 cellpadding=5 cellspacing=0 align=center>";

echo "<tr style=\"font-weight:bold\">
<td><font color=\"#000000\" size=\"3\"><b>Nick</b></font></td>
<td><font color=\"#000000\" size=\"3\"><b>Penize</b></font></td>
</tr>";

while($row = mysql_fetch_assoc($result)){

if($col == "#eeeeee"){
$col = "#ffffff";
}else{
$col = "#eeeeee";
}
echo "<tr background=\"transparent\">";
// bgcolor=$col
echo "<td><font size=\"2\">".$row['username']."</font></td>";
echo "<td><font size=\"2\">".$row['balance']."</font></td>";


echo "</tr>";
}

echo"</table>"

?>
<hr size="1" width="50%">
<a href="http://x-craft.eu/">iConomy List by BlackLight v1.0</a><br>
</body></html>

Re: Chyba u seznamu nejbohatších

Napsal: 01 úno 2013, 23:12
od zikl
použij tento je hezčí viewtopic.php?f=85&t=9606

Re: Chyba u seznamu nejbohatších

Napsal: 01 úno 2013, 23:24
od zdenda204
Asi má důvod ho použít :roll:
Pokuď se nemílím, tak ta chyba znamená že není co rozdělit.

Re: Chyba u seznamu nejbohatších

Napsal: 02 úno 2013, 08:41
od 007100
zdenda204 píše:Asi má důvod ho použít :roll:
Pokuď se nemílím, tak ta chyba znamená že není co rozdělit.


Jenže já už nevím kde opravovat chybu a tak jsem vám dal i config.

Re: Chyba u seznamu nejbohatších

Napsal: 02 úno 2013, 09:18
od 007100
No pak jsem si řekl, že tam budu mít někde primitivní chybu a také jsem ji našel, nenapsal jsem, že typ databáze je MySQL. Jenže se vyskytl jiný problém, convertoval jsem databázi z miniDB do MySQL ale pořád to nejde a hráči nemají své peníze.

Re: Chyba u seznamu nejbohatších

Napsal: 02 úno 2013, 19:10
od nejento
Ono, když nám dáš configy, které nejsou v Code, tak my prd poznáme, jestli není chyba například v odřádkování a hlavně, musel bys v configu mít nastavené iConomy na MySQL a ne na minidb:

Kód: Vybrat vše

Type: 'minidb'

Re: Chyba u seznamu nejbohatších

Napsal: 03 úno 2013, 01:46
od 007100
To když udělám, tak se právě vše smaže. Vše už jsem vyřešil ale potřeboval bych převést miniDB do MySQL.

Re: Chyba u seznamu nejbohatších

Napsal: 03 úno 2013, 13:22
od nejento
Uplně dole v configu máš conversion. Vypni server, nastav conversion, server zapni. Vše se překonvertuje. Server vypni a converzi vypni, protože by se při každém spuštění stále konverovaly věci z minidb do MySQL a částky by se přepisovaly. Server zapni.

Re: Chyba u seznamu nejbohatších

Napsal: 05 úno 2013, 18:35
od 007100
nejento píše:Uplně dole v configu máš conversion. Vypni server, nastav conversion, server zapni. Vše se překonvertuje. Server vypni a converzi vypni, protože by se při každém spuštění stále konverovaly věci z minidb do MySQL a částky by se přepisovaly. Server zapni.


Server je plný, pak zkusím, díky. Předtím mi to totiž nešlo ta konverze.

Re: Chyba u seznamu nejbohatších

Napsal: 05 úno 2013, 18:54
od 007100
Nejde

Kód: Vybrat vše

# iConomy 6.0.8b
# @author     Nijikokun <nijikokun@gmail.com>
# @license    GPLv2
# @copyright  Copyright AniGaiku LLC (C) 2010-2011
##
# Setup Notes
#   - Seconds
#         Basic Table:
#           1 minute = 60 seconds
#           1 hour = 1 minute * 60 = 3600 seconds
#           1 day = 1 hour * 24 = 86400 seconds
#           1 week = 1 day * 7 = 604800 seconds
#   - Database
#           Do not use remote databases from free sites, please use either a
#           remote database from a personal hosted VPS or DEDI or a local
#           database. This will prevent any 'timeout' or 'invalid settings'
#           or 'cannot connect to database' issues. Thank you :)!
##

System:
  Permissions:
    Use:
      # Should a user have the 'iConomy.holdings' to use /money
      # By default this is false, so that people stop complaining that
      # iConomy doesn't work. Yes, people actually report that.
      # If you are one of those people, leave this false.
      Holdings: false

  Default:
    Currency:
      # Major is the first segment [Major].Minor

      # Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
      Major: [ 'Dollar', 'Dollars' ]

      # Minor (Major.[Minor]) 0.23 Coins  (With Seperate 0 Dollars, 23 Coins)
      Minor: [ 'Coin', 'Coins' ]

    Account:
      # Default account balance when created
      Holdings: 30.0

  # Controls how money is formatted through methods
  Formatting:
    # Minor allows you to use the Minor amounts for amounts <1
    # Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
    Minor: false

    # Seperate allows your money to be shown in an alternative way,
    # instead of 1.32 it will show as 1 Dollar 23 Coins
    # !!! NOTICE: This only works if Minor is set to true !!!
    Seperate: false                               # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)

    # Single shows your money in another alternative way.
    # Instead of 1.23 Dollars you will see: 1 Dollar.
    # If your money is 0.23 you will see 0 Dollars if Minor is false, 23 Coins if Minor is true.
    # !!! Notice: This overrides seperate !!!
    Single: false

  # Logs all monetary transactions passed through iConomy
  Logging:
    Enabled: false

  # Purges Default Balances at Loading
  # Good way to keep unused accounts or default accounts wiped out and lower database usage.
  Purging:
    Enabled: true

  # Controls amount of money gained at a set interval.
  Interest:
    Enabled: false

    # Only give interest to players who are currently online?
    Online: true

    Announce:
      # Send a message when the player gains interest?
      Enabled: false

    Interval:
      #  Interval is done in seconds, here is a easy reference table for commonly set intervals:
      #   1 minute = 60 seconds
      #   1 hour = 1 minute * 60 = 3600 seconds
      #   1 day = 1 hour * 24 = 86400 seconds
      #   1 week = 1 day * 7 = 604800 seconds
      Seconds: 60

    Amount:
      # The balance to be met where we stop giving interest.
      # 0.0 for no limit
      Cutoff: 0.0

      # Percentage of holdings to give / take (Negative to take) (Overrides Min/Max)
      Percent: 0.0

      # This is range based, to set a "flat" or "constant" rate, set each (Maximum and Minimum) to the same number.
      # If the two numbers are different, it will be a random amount in-between the two.
      Maximum: 1
      Minimum: 2

  Database:
    # Databases Supported:
    # Flatfile, FF, mini, minidb
    #  - These all equate to miniDB
    ##
    # item, items, inventory, inventoryDB
    #  - These all equate to InventoryDB, which uses inventory for storage
    ##
    # xp, exp, orb, xpdb, expdb, orbdb
    #  - These all equate to ExperienceDB, which relies on Experience for balance.
    ##
    # mysql, mysqldb
    #  - These will attempt to connect to MySQL
    ##
    # sqlite, sqlite2, sqlite3, sqlitedb
    #  - These will attempt to create & connect to SQLite
    ##
    # postgre, postgreSQL, postgreDB
    #  - These will attempt to connect to PostgreSQL
    Type: 'minidb'
   
    # These are for InventoryDB only.
    #
    # InventoryDB is essentially Physical Money.
    #   It isn't logged in a database, its based on the users inventory
    #   and the two items selected below.
    #
    # MajorItem is the item or block ID of the major currency
    # MinorItem is the item or block ID of the minor currency
    # e.g. MajorItem: 266, MinorItem: 265 for Gold/Iron
    MajorItem: 266
    MinorItem: 265

    # This controls the database name, by default it is iConomy
    Table: 'iConomy'

    # URL is for SQL Databases Only
    ##
    # Path to iConomy folder is easy, it's the COMPLETE path.
    # (Mine) G:\MineCraft\plugins\iConomy\
    # Won't be the same as yours, but it usually looks like that.
    ##
    # [H2DB Default] h2:path/to/iConomy/folder/iConomy;AUTO_RECONNECT=TRUE
    # [SQLite Default] sqlite:path/to/iConomy/folder/iConomy.db
    ##
    # Binary Databases use ip:port style connections.
    # ip
    #  - is the connection identifier (internet protocol)
    #  - for ipv6 usually encased in brackets [::1]
    # port
    #  - the port that the database is listening on
    #  - defaults: 3306 for mysql, postgre is either 5740 or 5432
    ##
    # [MySQL Default] mysql://localhost:3306/iConomy
    # [Postgre Default] postgresql://localhost:5740/iConomy
    URL: 'mysql://gimli.fakaheda.eu:3306/109417_mysql_db'

    # Login details for binary databases
    Username: '109417_mysql_db'
    Password: 'trololol'

    ##############################################################
    # !!! Conversion is not your database settings !!!
    ##############################################################
    # Conversion allows you to convert your old 5.x to the new 6.x
    # All is currently unused.
    ##############################################################
    # URL is for MySQL only, H2DB doesn't use it.
    ##############################################################
    Conversion:
      # Set to True, After converting, change this back to false!
      Enabled: true

      # Database Type, H2DB or MySQL
      Type: 'MySQL'

      # Database Table
      Table: 'iConomy'

      # Database URL without table at the end.
      URL: 'mysql://gimli.fakaheda.eu:3306/109417_mysql_db'

      # Username / Password
      # H2DB does not use this. MySQL Only.
      Username: '109417_mysql_db'
      Password: '******'

      # Unused ATM.
      All: true



nejento píše:a částky by se přepisovaly.


To já ale chci aby se to aktualizovalo, ne?