Jump to content
  • 0

Votes does not show in game :-/


Question

Posted

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

12 answers to this question

Recommended Posts

Posted

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

Posted

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

Posted (edited)

 

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

 

this is table from your vote database , like this :

	  CREATE TABLE `vote_point` (
      `account_id` int(11) NOT NULL default '0',
      `point` int(11) NOT NULL default '0',
      `last_vote1` int(11) NOT NULL default '0',
      `last_vote2` int(11) NOT NULL default '0',
      `last_vote3` int(11) NOT NULL default '0',
	  `last_vote4` int(11) NOT NULL default '0',
	  `last_vote5` int(11) NOT NULL default '0',
      `date` text NOT NULL,
      PRIMARY KEY  (`account_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

i use this query for save my vote points

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `point` FROM `vote_point` WHERE account_id="+getcharid(3)+" LIMIT 1",.@rewards);
    if (!.@rewards)
    end;

    query_sql("UPDATE `vote_point` SET point=(point-"+.@rewards+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@rewards;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Harap Relogin kembali ~";
    end;
}

and use this for convert it to cash point ,

 

maybe it different with you database, so i use the COLUMNUSER, YOURCOLUMNPOINTS and YOURTABLEVOTE for example row in database :)

 

note : first script its wrong sir , sorry my mistake :D

 

post here your database where it save the vote from flux..

Edited by nostafu
Posted

 

 

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

 

this is table from your vote database , like this :

	  CREATE TABLE `vote_point` (
      `account_id` int(11) NOT NULL default '0',
      `point` int(11) NOT NULL default '0',
      `last_vote1` int(11) NOT NULL default '0',
      `last_vote2` int(11) NOT NULL default '0',
      `last_vote3` int(11) NOT NULL default '0',
	  `last_vote4` int(11) NOT NULL default '0',
	  `last_vote5` int(11) NOT NULL default '0',
      `date` text NOT NULL,
      PRIMARY KEY  (`account_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

i use this query for save my vote points

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `point` FROM `vote_point` WHERE account_id="+getcharid(3)+" LIMIT 1",.@rewards);
    if (!.@rewards)
    end;

    query_sql("UPDATE `vote_point` SET point=(point-"+.@rewards+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@rewards;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Harap Relogin kembali ~";
    end;
}

and use this for convert it to cash point ,

 

maybe it different with you database, so i use the COLUMNUSER, YOURCOLUMNPOINTS and YOURTABLEVOTE for example row in database :)

 

note : first script its wrong sir , sorry my mistake :D

 

post here your database where it save the vote from flux..

 

 

CREATE TABLE IF NOT EXISTS `cp_votes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `banner_id` int(10) unsigned NOT NULL,
  `account_id` int(10) unsigned NOT NULL,
  `credits` int(10) unsigned NOT NULL,
  `vote_date` datetime NOT NULL,
  `vote_ip` varchar(15) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `banner_id` (`banner_id`,`account_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=563 ;
 
Here :-) Can you make one for me :-) 

@rewards - what does this mean? Is it the command to convert? or can i use @cash?

Posted
-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `credits` FROM `cp_votes` WHERE account_id="+getcharid(3)+" LIMIT 1",.@cash);
    if (!.@cash)
    end;

    query_sql("UPDATE `cp_votes` SET credits=(credits-"+.@cash+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@cash;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Please relogin ~";
    end;
}

-[TAB]script[TAB]RewardPointConvertnew[TAB]-1,{

 

in first line check TAB , if error in line 1 :D

Posted (edited)
-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `credits` FROM `cp_votes` WHERE account_id="+getcharid(3)+" LIMIT 1",.@cash);
    if (!.@cash)
    end;

    query_sql("UPDATE `cp_votes` SET credits=(credits-"+.@cash+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@cash;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Please relogin ~";
    end;
}

-[TAB]script[TAB]RewardPointConvertnew[TAB]-1,{

 

in first line check TAB , if error in line 1 :D

 

 

: DB error - BIGINT UNSIGNED value is out of range in '(`ragnarok`.`cp_votes`.`credits` - 10)'
 
 
Error. Only 10 cash got by the players but they already have 200
 
Sir I figure out that the converter convert it like 10 vote points = 2 csh points only
Edited by Markyieee
Posted (edited)

Try to check it on your control panel. addons/config/addon.php

problem is if someone vote in 1st time they get cash.. but next time when they vote their not increase its stuck at 3 all time..

did u solved your problem ?

could you plz help me?

Edited by JassMax
Posted

Can you post the addon.php here? :-)

_______

Here sir.. this will be Great help

<?php if (!defined('FLUX_ROOT')) exit;
return array(		
	'PointsType'			=> "cash", // credit, vote, cash
	'DefaultIntervalVoting' => 12,
	'DefaultVotePoints' 	=> 0,
	'VoteNameMax'			=> 15,
	'VoteNameMin' 			=> 6,
	'VotePointsMin'			=> 0,
	'VotePointsMax'			=> 999,
	'VoteIntervalMin'		=> 1,
	'VoteIntervalMax'		=> 24,
	'AllowedImgType'		=> array('jpg', 'jpeg', 'png', 'gif'),
	'MaxFileSize'			=> 500, // KB,
	'ImageMaxWidth'			=> 150,
	'ImageMaxHeight'		=> 150,
	'ImageUploadPath'		=> "votes", // /themes/default/img/votes/
	'EnableIPVoteCheck'		=> true,
	'AlphaNumSpaceRegex'	=> "/^[A-Za-z0-9_\s]+$/",

	'MenuItems'	=> array(
		'Other'	=> array(
			'Vote for Points' => array(
				'module' => 'voteforpoints'
			)
		)
	),

	'SubMenuItems'	=> array(
		'voteforpoints'	=> array(
			'index' => 'Vote',
			'add' => 'Add Voting Site',
			'list' => 'List Voting Sites',
			'log' => 'Voters Log',
		)
	),

	'FluxTables'	=> array(
		'vfp_logs' => 'cp_vfp_logs',
		'vfp_sites' => 'cp_vfp_sites',
	)
)
?>
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...