Dice

Dice 1.0.2

No permission to download
It works, besides quoting, that's still messed up.
Quoting it works, but when you refresh the page the post you made turns blank and this server error pops up.
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: BB code to string error:Mysqli statement execute error : Duplicate entry '242493' for key 'PRIMARY' - library/Zend/Db/Statement/Mysqli.php:214
Generated By: derpyhooves, A moment ago
Stack Trace
#0 /home/redligh1/public_html/forums/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/redligh1/public_html/forums/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/redligh1/public_html/forums/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `bb...', Array)
#3 /home/redligh1/public_html/forums/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('bbm_dice', Array)
#4 /home/redligh1/public_html/forums/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#5 /home/redligh1/public_html/forums/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#6 /home/redligh1/public_html/forums/library/Sedo/Dice/Listener.php(130): XenForo_DataWriter->save()
#7 [internal function]: Sedo_Dice_Listener::bbmDice('d20', Array, 'bbm_dice', false, Array, Object(WidgetFramework_XenForo_BbCode_Formatter_Base), 'bbm_dice')
#8 /home/redligh1/public_html/forums/library/XenForo/CodeEvent.php(73): call_user_func_array(Array, Array)
#9 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Base.php(604): XenForo_CodeEvent::fire('bbm_callback_te...', Array, 'bbm_dice')
#10 [internal function]: BBM_BbCode_Formatter_Base->TemplateMethodRenderer(Array, Array, Object(WidgetFramework_XenForo_BbCode_Formatter_Base))
#11 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(740): call_user_func(Array, Array, Array, Object(WidgetFramework_XenForo_BbCode_Formatter_Base))
#12 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Base.php(775): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#13 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Extensions/PreCacheBase.php(95): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#14 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(647): BBM_BbCode_Formatter_Extensions_PreCacheBase->renderValidTag(Array, Array, Array)
#15 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(560): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#16 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(541): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#17 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Base.php(1393): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#18 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(1451): BBM_BbCode_Formatter_Base->renderSubTree(Array, Array)
#19 [internal function]: XenForo_BbCode_Formatter_Base->renderTagQuote(Array, Array, Object(WidgetFramework_XenForo_BbCode_Formatter_Base))
#20 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(740): call_user_func(Array, Array, Array, Object(WidgetFramework_XenForo_BbCode_Formatter_Base))
#21 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Base.php(775): XenForo_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#22 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Extensions/PreCacheBase.php(95): BBM_BbCode_Formatter_Base->renderValidTag(Array, Array, Array)
#23 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(647): BBM_BbCode_Formatter_Extensions_PreCacheBase->renderValidTag(Array, Array, Array)
#24 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(560): XenForo_BbCode_Formatter_Base->renderTag(Array, Array, 0)
#25 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(541): XenForo_BbCode_Formatter_Base->renderTreeElement(Array, Array, 0)
#26 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Base.php(1393): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#27 /home/redligh1/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(521): BBM_BbCode_Formatter_Base->renderSubTree(Array, Array)
#28 /home/redligh1/public_html/forums/library/BBM/BbCode/Formatter/Extensions/PreCacheBase.php(80): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#29 /home/redligh1/public_html/forums/library/XenForo/BbCode/Parser.php(505): BBM_BbCode_Formatter_Extensions_PreCacheBase->renderTree(Array, Array)
#30 /home/redligh1/public_html/forums/library/XenForo/BbCode/TextWrapper.php(119): XenForo_BbCode_Parser->render('[QUOTE="The Min...', Array)
#31 /home/redligh1/public_html/forums/library/XenForo/Template/Abstract.php(265) : eval()'d code(1601): XenForo_BbCode_TextWrapper->__toString()
#32 /home/redligh1/public_html/forums/library/XenForo/Template/Abstract.php(265): eval()
#33 /home/redligh1/public_html/forums/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('$__output = '';...', Array)
#34 /home/redligh1/public_html/forums/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#35 /home/redligh1/public_html/forums/library/XenForo/ViewRenderer/HtmlPublic.php(123): XenForo_Template_Public->render()
#36 /home/redligh1/public_html/forums/library/XenForo/FrontController.php(618): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#37 /home/redligh1/public_html/forums/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#38 /home/redligh1/public_html/forums/index.php(13): XenForo_FrontController->run()
#39 {main}
Request State
array(3) {
  ["url"] => string(70) "http://redlightponyville.com/forums/threads/dice-have-been-added.5459/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
I'm guessing it's cause of the dice tags trying to roll the dice again in said quote...
 
@derphyhooves
There were several problems and one was coming from an issue with the Bbm. I've updated both addon codes on Github (Bbm - Bbm dice). The quotes rendering has been integrated as well.
 
cclaerhout updated Dices with a new update entry:

Version 1.0.1 released

Version 1.0.1 released

To read first
This update is going to be a little complicated. Since I've made a mistake with the plural of the word dice and I used this word in the class names, in the database and in the Bb Code config, I had to modify everything.

This update will be considered as a new installation. So after install it, you will have two addons installed : "[BBM] Dice" (the new addon) & "[BBM] Dices" (the former addon).

Don't remove the former addon before installing...

Read the rest of this update entry...
 
Hello @cclaerhout
Is there a possibility of adding the "dice" in private messages?
In the current version of the addon, no. But feel free to update the code to your own needs. As I said in the addon presentation, I will not do custom modifications for it (the reason is simple: I don't need it).
 
In the current version of the addon, no. But feel free to update the code to your own needs. As I said in the addon presentation, I will not do custom modifications for it (the reason is simple: I don't need it).
I understand. This option is required for my role and RPG forums. Thanks, too.
 
cclaerhout updated Dice with a new update entry:

Version 1.0.2 released

Version 1.0.2 released
This new release was made by Xon. Changelog:
  • Bug fix when unserializing data
  • Standardization of the error management
  • Move dice rolling into Model to make it easier to extend
  • New options to check the dice format and to limit their numbers

I repeat that this addon is just a demo (that was coded to test the Bbm pre-cache system). Using Bb Codes to create a dice addon is not necessary the best way to do. An other addon has been recently...

Read the rest of this update entry...
 
  • Like
Reactions: Xon
... but only the first thrown will be saved, so the other will show the results of the first thrown.
Err.. what does this mean? If you threw more than once dice in the same post (with different configuration, such as one D6 and one D8), the returned number will always be the same? Or the results will only be the same if you threw more than one dice with the exact same configuration (two or more D6)? Well, from the screenshot I'm guessing it's the latter.
 
Back
Top Bottom