ID:145371
 
Code:
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?

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)
if(random == 3)
usr << "Destruction of nature, gather in flame! Fire!"

and for the whole world to see it just swap usr for world.
That should do the trick.
In response to Dan13
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)
> if(random == 3)
> usr << "Destruction of nature, gather in flame! Fire!"
>

and for the whole world to see it just swap usr for world.
That should do the trick.

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(random == 3)
usr<<"Destruction of nature, gather in flame! Fire!"


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.

In response to DarkCampainger
lol yeh your variables have to match. sorry i missed that ealier.
In response to Dan13
Fire1
Select=1
Target=0
DType=3
TType=3
ATime=2
Damage=16
Attrib = list("fire")
MPCost=5
LvlNeed=2
var/random = rand(1,5)
if(random == 3)
usr<<"Destruction of nature, gather in flame! Fire!"


Now it says Inconsistent indentation
In response to ForsakenSoul
never mind fixed it
In response to ForsakenSoul
Please, do us all a favor and memorize the DM guide.
In response to Flame Sage
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
In response to 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
In response to ForsakenSoul
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.