Help needed for dropcalc testing.

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

would be a nice features for your dropcalc, just need to show this faultes every admin and gm :)

found a bug in you sql script. Line 10 USE `l2jdb`;

Not everyone runs his db with this name :)
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

okay got it runing :) very nice job
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

got only one problem :

Warning: file(): open_basedir restriction in effect. File(/home/christian/l2j/gameserver/data/announcements.txt) is not within the allowed path(s): (/var/www/web2/:/var/www/phpmyadmin/:/var/www/confixx/html/gesperrt/) in

how to give him rights on taht folder ?

and another error when i search for mobs , in order keltir, and klick on silver nuggets then i get this error:

Warning: Missing argument 7 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

Warning: Missing argument 7 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

Warning: Missing argument 8 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

Warning: Missing argument 9 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

Warning: Missing argument 6 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

Warning: Missing argument 7 for mobcount() in /var/www/web2/html/dropcalc/config.php on line 643

end so on :)

and another one is when i klick the arrow near field char it shows me all chars but this error msg is above:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 216 in /var/www/web2/html/dropcalc/c-search.php on line 185

another one is when i list items and klick on the button where it shows me which char is holding such an item there comes:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38 in /var/www/web2/html/dropcalc/ci-search.php on line 224

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38 in /var/www/web2/html/dropcalc/ci-search.php on line 225

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38 in /var/www/web2/html/dropcalc/ci-search.php on line 226

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 38 in /var/www/web2/html/dropcalc/ci-search.php on line 227
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

law wrote:found a bug in you sql script. Line 10 USE `l2jdb`;
Can't change that dynamically. It's up to the person using it to change it before running the script.

The script is running as webadmin, (see the bit on setting up the permissions for the chat - then you'll find out the user name of your web system - and make them a member of the group that has permissions to the files.

keltir search problem - in i-count.php search for mobcount - the line should read ...
$mob_spwn = mobcount($mob_id,$db_location,$db_user,$db_psswd, $db_l2jdb, $dblog_location, $dblog_user, $dblog_psswd, $dblog_l2jdb);
law wrote:and another one is when i klick the arrow near field char
I'm not sure where you are here.
law wrote:when i list items and klick on the button where it shows me which char is holding such an item there comes:
That is a result of searching the characters table for the character name. Check that the character is still in your characters table ... maybe put an echo statement above the sqp variable assignment to make sure the variable $c_owner contains a valid character name? The function is working here.

I think I will introduce another tool to search for items that don't belong to characters, characters that don't belong to accounts, etc.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

law wrote:and another one is when i klick the arrow near field char it shows me all chars but this error msg is above:
Found it. It relates to a search for the clanid number of a clan.

In c-search, at arouns line 186, there is a $ missing from the front of "result clan" the line should read ...

if (!$result_clan)
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

keltir search problem - in i-count.php search for mobcount - the line should read ...
$mob_spwn = mobcount($mob_id,$db_location,$db_user,$db_psswd, $db_l2jdb, $dblog_location, $dblog_user, $dblog_psswd, $dblog_l2jdb);


there is no i-count.php :)

got it its called i-search ^^
Last edited by law on Fri Aug 11, 2006 6:48 am, edited 1 time in total.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Sorry - i-search.php - I haven't had my coffee this morning.

Also, I'm having a problem with pattern matching in PHP. My usual perl stuff isn't working in preg_replace for some reason.

Basically, I've got a string and I want to strip it so that there are only alphanumerics and underscores in it (for the user name) What is the best way to do this in PHP please?
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

hm in c++ i would know some ways.

maybe this helps you a bit , but dont knowif its the right way.

http://de2.php.net/manual/en/function.p ... ch-all.php[/quote]
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Found it ...
$usrnamechk2 = preg_replace('/[^a-z,^A-Z,^0-9,^_]/', '', $usrname);
I was being a dullard and using .. instead of - !!! I write too many languages :( and don't drink enough coffee :lol:
Last edited by msknight on Fri Aug 11, 2006 8:56 am, edited 1 time in total.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

also an error in cl-search.php

change this:

line 309: check_item channge to this
check_item($c_item, $db_location, $db_user, $db_psswd, $db_l2jdb, $dblog_location, $dblog_user, $dblog_psswd, $dblog_l2jdb);
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

another problem , when you klick on Mobs by Lvl and try to sort by Type you get an error , cant see the error there files to big for vi on shell ^^

edit: sort for mp dont works too
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Are you using the datapack that has the separate spawns for day and night? If those columns aren't there, that could be what is causing the problem.

Sort for hp, mp isn't working because the "," is getting stripped out by the string check function at the bottom of config.php. I'll correct that. Thanks!

EDIT - Line at the bottom of config.php should read ...
$str = preg_replace('/[&;%$\/\|@<>#£]/','',$str);
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

replace solved tha problem
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

... and now I've got to go to work :( ... again. Keep posting anything you find, and I'll sort it out when I return home.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

i will be back here on wednesday
Locked