Got dice?


log in or register to remove this ad




I'm still working on learning PHP and databases, but from what I can tell, altering it so that you can have two different dice rolls won't work, based on the way it stores the data in a/the database. I'm not really convinced the way this was coded is necessarily the best way, but on the other hand it's constrained by the fact that you do need to record the data somewhere, because you want everyone to see the same number.

EDIT:

[dice=1]9[/dice]

So apparently, it's not "up to and including 30", but a specific subset? Or I'm a tool and can't get it to work, one of the two.
 
Last edited:

[dice]

Let's see if this works...

EDIT: And it does, further demonstrating how the database storage works. The first time I put in an illegal dice roll - 3d1. It didn't like that, but changing the parameters didn't work, because the dice function is stored with the message. So I had to post it in a new reply to get it to work.
 
Last edited:

LightPhoenix said:
[dice]

Let's see if this works...

EDIT: And it does, further demonstrating how the database storage works. The first time I put in an illegal dice roll - 3d1. It didn't like that, but changing the parameters didn't work, because the dice function is stored with the message. So I had to post it in a new reply to get it to work.


pssstttt...rtfm...Morrus's posts...says max 3 dice. with sides from 2 to 30.

clip here is an important part :
Morrus said:
(I don't mind limiting it to "real" dice instead of anything between 2 and 30 - it would require quite a few dice to be drawn, but I'm sure that could be done).
 


diaglo said:
pssstttt...rtfm...Morrus's posts...says max 3 dice. with sides from 2 to 30.

clip here is an important part :
While your attitude isn't appreciated, thank you for pointing that out. When I switched from 3d1 (which for some reason didn't register as being invalid) to 1d9, I mistakenly assumed that d9 was invalid, when in fact it was due to the database storing the invalid dice roll. All of which I stated in my post above, if you'd bothered to read it.

What would the abbreviation for that be, rtfp?
 


Remove ads

Top