[(X)Aseco] Fufi Widgets (v0.80b)

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by kama » 09 Jan 2009 23:14

Hi Fish
The last version of the widgets is great... very nice work to the crew!
A little truble: On my scoreboard, for the top winners, it shows the list starting backwards, so I see the ones who have 0 victories.....
A way to correct that?¿
btw, my server is stunt maybe there is something there. We also have pthers servers without any problem, and same fufi configuration (we duplicate from the original server). Any explanation ?¿

Thanks in advance and keep up the good work :thumbsup:
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

Zogug
wheelbarrow operator
wheelbarrow operator
Posts: 15
Joined: 24 May 2008 11:22
Owned TM-games: TMS

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Zogug » 12 Jan 2009 15:21

Hey Fufi!
Great widgets you make, we love them on my server... :)
But since I installed ver. 0.80b, there is a strange little bug. I have a resident player who is a member of the &-team. They use & as tag. But somehow the & disapears in the record-widgets... I investigatet and found out that if I write a / message (/me /msg /admin say...) the & always disapears??
Which means if I write /me & Fufi are having fun, it displays TomTurbo Fufi are having fun... It does not matter where in the sentence the & is, it always disapers...
Any ideas why?? It work with the old fufi 0.7something. I have Aseco 220c... The only thing I updated was fufi...

Thanx
Tom
Tom Turbo's FunServer, the only server with a Radioshow! Join us every Sunday 21.00 CET for a nice round of T&T-Sundays! Join TTFS or visit http://ttfs.mine.nu

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by kama » 13 Jan 2009 16:20

kama wrote:Hi Fish
The last version of the widgets is great... very nice work to the crew!
A little truble: On my scoreboard, for the top winners, it shows the list starting backwards, so I see the ones who have 0 victories.....
A way to correct that?¿
btw, my server is stunt maybe there is something there. We also have pthers servers without any problem, and same fufi configuration (we duplicate from the original server). Any explanation ?¿

Thanks in advance and keep up the good work :thumbsup:

Any help?¿
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by f*ckfish » 13 Jan 2009 20:02

I'll have a look at it soon =)
inactive, sorry

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by kama » 16 Jan 2009 19:05

Tx man!
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

gpetkov
pedestrian
pedestrian
Posts: 5
Joined: 12 Jan 2009 20:52
Owned TM-games: TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by gpetkov » 21 Jan 2009 22:44

tcq wrote:
cri cri wrote:hello, what does this message please?

[RASP Karma Error] Failed to select karma. Error text = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near''at line 1
sql = Select goodkarma, challenges from badkarma WHERE ID =

all functions are activated fufi, record management works perfectly, the plugin is loaded, I turs the message that I can not solve

php version that I should use to avoid this error?
As you see it goes to the columns goodkarma and challenges WHERE ID = ...

Now,i don't know how the database is build up, but this sql query is wrong.

Ok i will show u the code and if u can help me cos' i have the same error.

Here we select the ID (the error says that WHERE ID= .. i mean it remains empty)

Code: Select all

	$query = 'select GoodKarma, BadKarma from challenges WHERE ID=' . $challenge->data['DB_ID'];
and the $challenge->data['DB_ID']; value comes from here

Code: Select all

	$challenge->data['DB_ID'] = $this->getChallengeId($challenge->uid);
and the $this->getChallengeId($challenge->uid); from here:

Code: Select all

function getChallengeId($uid)
		{
		$query = 'SELECT Id FROM challenges WHERE Uid=\'' . mysql_real_escape_string($uid) . '\'';
		$res = mysql_query($query);
		if (mysql_num_rows($res) > 0)
			{
			$row = mysql_fetch_row($res);
			$rtnval = $row[0];
			}
		else
			{
			$rtnval = 0;
			}
		mysql_free_result($res);
		return $rtnval;
		}
I am newbie in the PHP but i cant find an error.. if some1 can help to resolve this bug.. Im using aseco 2.2.0c and fufi 0.8b

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Assembler Maniac » 22 Jan 2009 00:10

Add a the following right after the mysql_query in getChallengeId:

echo "getChallengeId debug info\r\n";
echo "Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) . "\r\n";
print_r($res);

It's possible the $res is false, which indicates an error in the query. The query will be printed so you can see what's up. Neither of these debug items will go to the log, but they'll be in the console window so you can read them.
gpetkov wrote:Ok i will show u the code and if u can help me cos' i have the same error.

Here we select the ID (the error says that WHERE ID= .. i mean it remains empty)

Code: Select all

	$query = 'select GoodKarma, BadKarma from challenges WHERE ID=' . $challenge->data['DB_ID'];
and the $challenge->data['DB_ID']; value comes from here

Code: Select all

	$challenge->data['DB_ID'] = $this->getChallengeId($challenge->uid);
and the $this->getChallengeId($challenge->uid); from here:

Code: Select all

function getChallengeId($uid)
		{
		$query = 'SELECT Id FROM challenges WHERE Uid=\'' . mysql_real_escape_string($uid) . '\'';
		$res = mysql_query($query);
		if (mysql_num_rows($res) > 0)
			{
			$row = mysql_fetch_row($res);
			$rtnval = $row[0];
			}
		else
			{
			$rtnval = 0;
			}
		mysql_free_result($res);
		return $rtnval;
		}
I am newbie in the PHP but i cant find an error.. if some1 can help to resolve this bug.. Im using aseco 2.2.0c and fufi 0.8b

gpetkov
pedestrian
pedestrian
Posts: 5
Joined: 12 Jan 2009 20:52
Owned TM-games: TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by gpetkov » 22 Jan 2009 10:10

Assembler Maniac wrote:Add a the following right after the mysql_query in getChallengeId:

echo "getChallengeId debug info\r\n";
echo "Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) . "\r\n";
print_r($res);

It's possible the $res is false, which indicates an error in the query. The query will be printed so you can see what's up. Neither of these debug items will go to the log, but they'll be in the console window so you can read them.
gpetkov wrote:Ok i will show u the code and if u can help me cos' i have the same error.

Here we select the ID (the error says that WHERE ID= .. i mean it remains empty)

Code: Select all

	$query = 'select GoodKarma, BadKarma from challenges WHERE ID=' . $challenge->data['DB_ID'];
and the $challenge->data['DB_ID']; value comes from here

Code: Select all

	$challenge->data['DB_ID'] = $this->getChallengeId($challenge->uid);
and the $this->getChallengeId($challenge->uid); from here:

Code: Select all

function getChallengeId($uid)
		{
		$query = 'SELECT Id FROM challenges WHERE Uid=\'' . mysql_real_escape_string($uid) . '\'';
		$res = mysql_query($query);
		if (mysql_num_rows($res) > 0)
			{
			$row = mysql_fetch_row($res);
			$rtnval = $row[0];
			}
		else
			{
			$rtnval = 0;
			}
		mysql_free_result($res);
		return $rtnval;
		}
I am newbie in the PHP but i cant find an error.. if some1 can help to resolve this bug.. Im using aseco 2.2.0c and fufi 0.8b
But it doesn't prints anything ;(

Code: Select all

[01/22,12:07:20] map changed [none] >> [Moving Power]
[RASP Karma Error] Failed to select karma.  Error text=You have an error in your
 SQL syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near '' at line 1
sql=select GoodKarma, BadKarma from challenges WHERE ID=
[01/22,12:07:20] currently no record on Moving Power
Webaccess (dedimania.net:8013): send: deflate, receive: deflate

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Assembler Maniac » 22 Jan 2009 13:40

gpetkov wrote:
Assembler Maniac wrote:Add a the following right after the mysql_query in getChallengeId:

echo "getChallengeId debug info\r\n";
echo "Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) . "\r\n";
print_r($res);

It's possible the $res is false, which indicates an error in the query. The query will be printed so you can see what's up. Neither of these debug items will go to the log, but they'll be in the console window so you can read them.
gpetkov wrote:Ok i will show u the code and if u can help me cos' i have the same error.

Here we select the ID (the error says that WHERE ID= .. i mean it remains empty)

Code: Select all

	$query = 'select GoodKarma, BadKarma from challenges WHERE ID=' . $challenge->data['DB_ID'];
and the $challenge->data['DB_ID']; value comes from here

Code: Select all

	$challenge->data['DB_ID'] = $this->getChallengeId($challenge->uid);
and the $this->getChallengeId($challenge->uid); from here:

Code: Select all

function getChallengeId($uid)
		{
		$query = 'SELECT Id FROM challenges WHERE Uid=\'' . mysql_real_escape_string($uid) . '\'';
		$res = mysql_query($query);
		if (mysql_num_rows($res) > 0)
			{
			$row = mysql_fetch_row($res);
			$rtnval = $row[0];
			}
		else
			{
			$rtnval = 0;
			}
		mysql_free_result($res);
		return $rtnval;
		}
I am newbie in the PHP but i cant find an error.. if some1 can help to resolve this bug.. Im using aseco 2.2.0c and fufi 0.8b
But it doesn't prints anything ;(

Code: Select all

[01/22,12:07:20] map changed [none] >> [Moving Power]
[RASP Karma Error] Failed to select karma.  Error text=You have an error in your
 SQL syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near '' at line 1
sql=select GoodKarma, BadKarma from challenges WHERE ID=
[01/22,12:07:20] currently no record on Moving Power
Webaccess (dedimania.net:8013): send: deflate, receive: deflate
Like I said before, it won't put anything in the log file, it can only display it to the console. You can change the Echo lines to this:
$this->console_text('getChallengeId debug info');
$this->console_text("Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) );
But that won't help me see what's in $res.

Xymph
Pit Crew
Pit Crew
Posts: 5653
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Xymph » 22 Jan 2009 14:04

Assembler Maniac wrote:Like I said before, it won't put anything in the log file, it can only display it to the console. You can change the Echo lines to this:
$this->console_text('getChallengeId debug info');
$this->console_text("Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) );
But that won't help me see what's in $res.
You can print that to the logfile too. Try this:

Code: Select all

$this->console_text("Query: " . $query . CRLF . "Number of rows: " . mysql_num_rows($res) . CRLF . print_r($res, true));
Using hard-coded "\r\n" is a bad idea as well, hence my use of CRLF (which should be defined as just "\n" on Linux).
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Assembler Maniac » 22 Jan 2009 14:21

Xymph wrote:
Assembler Maniac wrote:Like I said before, it won't put anything in the log file, it can only display it to the console. You can change the Echo lines to this:
$this->console_text('getChallengeId debug info');
$this->console_text("Query: " . $query . "\r\nNumber of rows: " . mysql_num_rows($res) );
But that won't help me see what's in $res.
You can print that to the logfile too. Try this:

Code: Select all

$this->console_text("Query: " . $query . CRLF . "Number of rows: " . mysql_num_rows($res) . CRLF . print_r($res, true));
Using hard-coded "\r\n" is a bad idea as well, hence my use of CRLF (which should be defined as just "\n" on Linux).
Never knew you could re-direct print_r, thanks.

In XAseco I didn't know if CFLF was coded or not, so I used hard code. I agree that using the defined items makes it much more portable and readable.

Xymph
Pit Crew
Pit Crew
Posts: 5653
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Xymph » 22 Jan 2009 14:29

Assembler Maniac wrote:Never knew you could re-direct print_r, thanks.
YW, it's very handy indeed.
Assembler Maniac wrote:In XAseco I didn't know if CRLF was coded or not, so I used hard code. I agree that using the defined items makes it much more portable and readable.
It's derived from and expanded upon the original Aseco, after all. I use this:

Code: Select all

// check current operating system
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
  // on Win32/NT use:
  define('CRLF', "\r\n");
} else {
  // on Unix use:
  define('CRLF', "\n");
}
if (!defined('LF')) {
  define('LF', "\n");
}
This prevents those unnecessary carriage returns in Linux logfiles (the logging functions are the only code using CRLF, everything sent to the server can use LF).
(Sorry for hijacking the Widgets thread with this. :wink: )
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Assembler Maniac » 22 Jan 2009 14:42

Xymph wrote:
Assembler Maniac wrote:Never knew you could re-direct print_r, thanks.
YW, it's very handy indeed.
Assembler Maniac wrote:In XAseco I didn't know if CRLF was coded or not, so I used hard code. I agree that using the defined items makes it much more portable and readable.
It's derived from and expanded upon the original Aseco, after all. I use this:

Code: Select all

// check current operating system
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
  // on Win32/NT use:
  define('CRLF', "\r\n");
} else {
  // on Unix use:
  define('CRLF', "\n");
}
if (!defined('LF')) {
  define('LF', "\n");
}
This prevents those unnecessary carriage returns in Linux logfiles (the logging functions are the only code using CRLF, everything sent to the server can use LF).
(Sorry for hijacking the Widgets thread with this. :wink: )
That's ok, I hijacked your code snippet too, so we're even.

Xymph
Pit Crew
Pit Crew
Posts: 5653
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Xymph » 22 Jan 2009 15:59

Assembler Maniac wrote:That's ok, I hijacked your code snippet too, so we're even.
Heh, ok. :) Note that I removed the CR constant definition, because it isn't used anywhere.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by kama » 23 Jan 2009 13:15

Any chance somebody could help me with my most winners widget issue? It shows the lesser winners and not the most :( (0 victories...)
My server is a Stunt server, that would be the only explanation I can come up with, since others servers running same config but different modes run OK.....
Any ideas ?
Tx in advance.
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

Post Reply