Jump to content

Recommended Posts

 

thanks! working with minor issues

 

Edit: ticket listings in the support tickets error. the site crash 

 

?module=support&action=list 

Same issue here. Guessing the author no longer provides support?

Share this post


Link to post
Share on other sites

Hello :-)

 

Fix for Unable to vote for the server. Err no. 4 ?

 

 


 

/ modules / voteforpoints / function.php

+ This module not work for Hercules ? <_<

 

It uses:

if (!function_exists("getCashPoints")){    function getCashPoints($account_id, $server)    {        $sql = "SELECT value FROM global_reg_value WHERE account_id = ?";        $sth = $server->connection->getStatement($sql);        $sth->execute(array((int) $account_id));        return $sth->rowCount() ? (int) $sth->fetch()->value : 0;    }}

 

 

Hercules use: global_acc_reg_num_db  &  global_acc_reg_str_db   not global_reg_value

Share this post


Link to post
Share on other sites

if you're using latest rathena emulator you will have those error because rathena emulator doesn't use "acc_reg_num_db" anymore

 

to fix this

 

goto : config/addons.php

 

find this  'cashpoints' =>

 

and change acc_reg_num_db to global_reg_value

 

after that goto modules/voteforpoints/index.php

 

find $sql = "UPDATE $cp_tbl SET value = value + ? WHERE key = ? AND account_id = ?";

 

and change WHERE key = ? to WHERE str = ?

 

hope this helps

Share this post


Link to post
Share on other sites

when i click the voting sites, it counts the vote, the icon is disabled but .......nothing happens> it DID NOT redirect to the voting sites where the actual voting happens.  What could be the problem.? Thank you for the support

Share this post


Link to post
Share on other sites

when i click the voting sites, it counts the vote, the icon is disabled but .......nothing happens> it DID NOT redirect to the voting sites where the actual voting happens.  What could be the problem.? Thank you for the support

 

Please help :(

Share this post


Link to post
Share on other sites

To anyone having an Unable to vote for the server. Err no. 4  error try this fix. 
/modules/voteforpoints/index.php

Change

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE $cp_tbl SET value = value + ? WHERE key = ? AND account_id = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array((int) $res->votepoints, $cashpoints_var, $account_id));	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{		$sql = "INSERT INTO $cp_tbl VALUES (0, ?, ?, 2, ?)";		$sth = $server->connection->getStatement($sql);		$bind = array($cashpoints_var, $res->votepoints, $account_id);		$sth->execute($bind);		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

to

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE {$server->loginDatabase}.$cp_tbl SET `value` = value + ? WHERE `key` = ? AND `account_id` = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array($res->votepoints, $cashpoints_var, $account_id));    	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{	    $sql = "INSERT INTO {$server->loginDatabase}.$cp_tbl VALUES(?,?,0,?)";		$sth = $server->connection->getStatement($sql);		$sth->execute(array($account_id, $cashpoints_var, $res->votepoints));		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;
Edited by Dinze

Share this post


Link to post
Share on other sites

seems like feefty is away from RO community, what if we move those addons to git and start to get community to fix erros?

Share this post


Link to post
Share on other sites

seems like feefty is away from RO community, what if we move those addons to git and start to get community to fix erros?

 

I'm not sure if there's a problem but Vote for Points has no option to exchange it to Cash/Kafra points in-game directly from the site even if it's already set in addons.php 

 

Do you have an NPC script that changes vote points to cash? 

Share this post


Link to post
Share on other sites

 

To anyone having an Unable to vote for the server. Err no. 4  error try this fix. 

/modules/voteforpoints/index.php

Change

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE $cp_tbl SET value = value + ? WHERE key = ? AND account_id = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array((int) $res->votepoints, $cashpoints_var, $account_id));	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{		$sql = "INSERT INTO $cp_tbl VALUES (0, ?, ?, 2, ?)";		$sth = $server->connection->getStatement($sql);		$bind = array($cashpoints_var, $res->votepoints, $account_id);		$sth->execute($bind);		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

to

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE {$server->loginDatabase}.$cp_tbl SET `value` = value + ? WHERE `key` = ? AND `account_id` = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array($res->votepoints, $cashpoints_var, $account_id));    	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{	    $sql = "INSERT INTO {$server->loginDatabase}.$cp_tbl VALUES(?,?,0,?)";		$sth = $server->connection->getStatement($sql);		$sth->execute(array($account_id, $cashpoints_var, $res->votepoints));		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

Unfortunately still getting the same error, however, the points are at least applying! Thank you!

Share this post


Link to post
Share on other sites

 

 

To anyone having an Unable to vote for the server. Err no. 4  error try this fix. 

/modules/voteforpoints/index.php

Change

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE $cp_tbl SET value = value + ? WHERE key = ? AND account_id = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array((int) $res->votepoints, $cashpoints_var, $account_id));	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{		$sql = "INSERT INTO $cp_tbl VALUES (0, ?, ?, 2, ?)";		$sth = $server->connection->getStatement($sql);		$bind = array($cashpoints_var, $res->votepoints, $account_id);		$sth->execute($bind);		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

to

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE {$server->loginDatabase}.$cp_tbl SET `value` = value + ? WHERE `key` = ? AND `account_id` = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array($res->votepoints, $cashpoints_var, $account_id));    	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{	    $sql = "INSERT INTO {$server->loginDatabase}.$cp_tbl VALUES(?,?,0,?)";		$sth = $server->connection->getStatement($sql);		$sth->execute(array($account_id, $cashpoints_var, $res->votepoints));		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

Unfortunately still getting the same error, however, the points are at least applying! Thank you!

What error? Btw, do you issue displaying the current cash points?

 C9fxIBg.png

Share this post


Link to post
Share on other sites

 

 

 

To anyone having an Unable to vote for the server. Err no. 4  error try this fix. 

/modules/voteforpoints/index.php

Change

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE $cp_tbl SET value = value + ? WHERE key = ? AND account_id = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array((int) $res->votepoints, $cashpoints_var, $account_id));	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{		$sql = "INSERT INTO $cp_tbl VALUES (0, ?, ?, 2, ?)";		$sth = $server->connection->getStatement($sql);		$bind = array($cashpoints_var, $res->votepoints, $account_id);		$sth->execute($bind);		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

to

case "cash":	// insert or update cashpoints	$cashpoints_var = "#CASHPOINTS";	$sql = "UPDATE {$server->loginDatabase}.$cp_tbl SET `value` = value + ? WHERE `key` = ? AND `account_id` = ?";	$sth = $server->connection->getStatement($sql);	$sth->execute(array($res->votepoints, $cashpoints_var, $account_id));    	// account doesn't have a record for cashpoints	// so we will add a row	if ( ! $sth->rowCount())	{	    $sql = "INSERT INTO {$server->loginDatabase}.$cp_tbl VALUES(?,?,0,?)";		$sth = $server->connection->getStatement($sql);		$sth->execute(array($account_id, $cashpoints_var, $res->votepoints));		if ( ! $sth->rowCount())			$errorMessage = sprintf(Flux::message("UnableToVote"), 4);	}break;

Unfortunately still getting the same error, however, the points are at least applying! Thank you!

What error? Btw, do you issue displaying the current cash points?

 C9fxIBg.png

still getting the error.

Share this post


Link to post
Share on other sites

@Shatotech

Can you post your addon.php?

 

Mine is a fresh install but still getting the same error after applying that fix. 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.