Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006886

  • 1 - Low

  • Fixed

Issue Confirmations

  • Yes (1)No (0)
Photo

Error in @zeny after reviewing 16914

Posted by Hercules Bot on 12 November 2012 - 06:08 PM

Originally posted by Beret
After reviewing 16914 the command @zeny not working as before, when using @zeny -1000 or any other value of error in map-server. Also not shown more zeny's messages changed.

Posted Image

Originally posted by kyeme
I can confirm. And @cash / @points command :)

Originally posted by MarkZD
About cash and points, there was no change at it, maybe it was always bugged or it's just with you, kyeme. I'm checking.


For zeny, it's just to change within pc_getzeny.
if( zeny < 0 )
To
if( zeny < 0 && type != LOG_TYPE_COMMAND)

Or

It's just to add an if else in the zeny command:
if(zeny < 0)
  pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL);
else
  pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL);
But if the second case is chosen, so zeny won't can be negative through atcommand again.


The "error"(warning) from Cash and Points trigger when you're setting a value bigger than what you have to be discounted.

Also, pc_getcash and pc_paycash could be int.

Edited by MarkZD, 13 November 2012 - 02:30 AM.


Originally posted by Lighta
didn't get the @cash @point issue, otherwise yeah sorry for the @zeny part will be fixed tonight.
fixed in [rev=16923]

Originally posted by MarkZD
If you have 20 cash or point and you use @cash/points -21, it'll say it removed 21 points, but will show in front it didn't.

Your points still remain as 20 and an error will trigger in console, just a little bug in message as it doesn't check if the value send to pc_paycash in atcommand is not evaluated to check if it's bigger than your currency.

Originally posted by Beret
Still giving error and not removing lighta.

Originally posted by kyeme
Thanks MarkZD.

Hmm, make a new report for @cash and @points?

Originally posted by MarkZD

Thanks MarkZD.Hmm, make a new report for @cash and @points?

I'll do
http://rathena.org/b...5619#entry15619


Still giving error and not removing lighta.

It's because it's missing a subtraction operator before zeny in pc_payzeny.

The fix should be:
if(zeny > 0)
pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL);
else
pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL);

Edited by MarkZD, 13 November 2012 - 02:50 AM.


Originally posted by Lighta
refixed [rev=16924]

Originally posted by Beret
seems to work fine now lighta, most lack this message zeny's still, but it is just a detail.


clif_displaymessage(fd, msg_txt(176));

Edited by Beret, 14 November 2012 - 04:24 PM.