var/rand(1,5)
if(random == 3) "Destruction of nature, gather in flame! Fire!"
Problem description:
SAys expected expression
is there anything that I can do to fix it?
ID:145371
![]() Apr 4 2006, 5:17 pm (Edited on Apr 4 2006, 6:30 pm)
|
|
Code:
var/rand(1,5) Problem description: SAys expected expression is there anything that I can do to fix it? |
Dan13 wrote:
yeh you need to put who sees the message, if you want the user to see it it needs to be > var/rand(1,5) and for the whole world to see it just swap usr for world. A few things. First, random is not defined, rand is. Second, you cannot set a variable name as a proc like that. What you probably wanted was something like this: var/random = rand(1,5) If it's a verb, then that should be fine. But if it's a proc (or a verb called manually like a proc), then you'll want to replace 'usr' with whatever references to the player. |
Fire1 Now it says Inconsistent indentation |
Flame Sage wrote:
Please, do us all a favor and memorize the DM guide. Please, do us all a favor and stop giving out bogus advice! Memorizing the DM guide is outright ridiculous, and isn't as effective as actually learning how to use the language by the use of step-by-step tutorials and experience. ~~> Unknown Person |
I learn by trail and error I'm also a hands on learner so I do it all that way reading it don't help me at all
|
Problem is, you don't seem to understand the basics of DM programming, or programming in general. I recommend http://zilal.byondhome.com/tutorials/zbt.html for a great tutorial that should get you introduced to the most basics of basics in programming with DM.
|
and for the whole world to see it just swap usr for world.
That should do the trick.