Author Topic: Issue with installing a DP module  (Read 4212 times)

Alchemion

  • Guest
Issue with installing a DP module
« on: February 02, 2009, 03:06:26 pm »
Hi,

I have been trying to find a suitable PVP arena for my test server and I came across the Maeher Online PVP Arena.

Due to the fact that this arena offers support for specialties, in lack of any better version, I decided to try it out on my nb core engine...

I have an issue when trying to install it:

Code: [Select]
ALTER TABLE arenastats
ADD userid int unsigned NOT NULL ,
ADD victories int unsigned NOT NULL ,
ADD defeats int unsigned NOT NULL ,
DROP PRIMARY KEY,
ADD PRIMARY KEY (userid)
Incorrect table definition; there can be only one auto column and it must be defined as a key
Call Stack:
1: db_query("ALTER TABLE arenastats A...") called from /mounted-storage/home113a/sub007/sc41001-XJFO/nb-core.net/lib/tabledescriptor.php on line 107
2: synctable("arenastats", Array(
"userid"=>Array(
"name"=>"userid", "type"=>"int unsigned"
), "victories"=>Array(
"name"=>"victories", "type"=>"int unsigned"
), "defeats"=>Array(
"name"=>"defeats", "type"=>"int unsigned"
), "key-PRIMARY"=>Array(
"name"=>"PRIMARY", "type"=>"primary key", "unique"=>"1", "columns"=>"userid"
)
), true) called from /mounted-storage/home113a/sub007/sc41001-XJFO/nb-core.net/modules/pvparena/install.php on line 43
3: require_once("/mounted-storage/home113a...") called from /mounted-storage/home113a/sub007/sc41001-XJFO/nb-core.net/modules/pvparena.php on line 9
4: pvparena_install() called from /mounted-storage/home113a/sub007/sc41001-XJFO/nb-core.net/lib/modules.php on line 1361
5: install_module("pvparena") called from /mounted-storage/home113a/sub007/sc41001-XJFO/nb-core.net/modules.php on line 41

I can't figure out what is wrong and where... at least I cannot see a solution for making the module adaptable to the nb engine, so, please any help would come would be praised ...

The Maeher's PVP Arena code is attached to this thread.

Thank you.

p.s. got any revised version of this arena or a better similar idea module, please share :)

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Issue with installing a DP module
« Reply #1 on: February 02, 2009, 03:31:47 pm »
Code: [Select]
Incorrect table definition; there can be only one auto column and it must be defined as a key
It won't work on any version, DP or NB.

Mysql returns an error, most likely the table definitions are wrong.

As the module is altering the table rather than generating it, I think you already *HAD* an arenastats table and either modified something OR another module generated it.

Delete the arenastats table and see if it helps. Though maybe the module is faulty.

The issue:

The primary key is dropped, and another one added. Sadly, it is NOT the auto increment value, and that is against mysql standards.

=)

All stated in the error message.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Issue with installing a DP module
« Reply #2 on: February 03, 2009, 06:24:01 pm »
thank you, Oliver.

I have uninstalled a previous pvp module that had arenastats inserted into the database and reinstalled Maeher's module.

Seems to work fine... there are some issues though with the development of this module... can you help me improve it for the benefit of this community also or can you provide a better pvp module (like you like to anticipate: doing the whole code remastering) ?...

You said something about providing an e-mail for the item system and other modified modules you would share... Do you have a good and working pvp arena that you would share ?...

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Issue with installing a DP module
« Reply #3 on: February 03, 2009, 10:43:55 pm »
I won't build or add a pvp arena - there are too many issues with the core.
There is simply no time.

All modified modules are on the shinobi legends module page.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Alchemion

  • Guest
Re: Issue with installing a DP module
« Reply #4 on: February 04, 2009, 04:59:32 pm »
the comment line pdf instant creator you have installed on shinobilegends... nice gadget... :) 

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Issue with installing a DP module
« Reply #5 on: February 05, 2009, 04:53:42 pm »
nice but not working fully.

I don't have a free UTF-8 ttf font anywhere - so I cannot display the Kanji properly.

That's a bad thing.

Notably, if you use fpdf as I did (external software) then you can do it with relative ease. I think the module is hardly 40 lines of productive code.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro