ID:140641
 
Code:
    verb
Certification2(mob/M in world)
set category = "GM"
set name = "Cert Two"
set desc = "Reward someone to Cert level Two for good RP."
if(M.Cert2 = 0)
M.Cert2=1
M<<"<font size=3><font color=red>You have been rewarded with Certification Level Two. Congratulations."
verb
Certification1(mob/M in world)
set category = "GM"
set name = "Cert One"
set desc = "Reward someone to Cert level One for good RP."
if(M.Cert1 = 0)
M.Cert1=1
M<<"<font size=3><font color=red>You have been rewarded with Certification Level One. Congratulations."


Problem description:

Why is it invalid?
Admin.dm:888:error:if :invalid proc definition = if(M.Cert2 = 0)
Admin.dm:889:error::invalid proc definition = M.Cert2=1
Admin.dm:897:error::invalid proc definition = M.Cert1=1


It's doing this with any If statement I make!
http://www.byond.com/docs/guide/

If you aren't going to put any effort into helping yourself, neither will I.
In response to Garthor
Garthor, I -am- trying. This is the first error i've had in 12 hours, and I've tried every method to fix it.
In response to Xorbah
In response to Xorbah
Try indentation.
Apparently, it's doing this with any if statement I make...any help here?
In response to Xorbah
Read the freaking DM guide instead of making a topic about every little thing.
In response to Xorbah
You are not using the correct operator.
In response to GhostAnime
The correct operator?
In response to GhostAnime
You mean the exclamation points at the beginning of some code, correct?
In response to Xorbah
Do you have any intention of learning DM?
In response to Vic Rattlehead
Indeed I do.
How long have you been coding?
In response to Nielz
Not long at all. A month, if that.
In response to Xorbah
Then you shouldn't be making silly mistakes like these anymore.

You need to use == within if() statements. = is for changing things, not for comparing. Look up these in the DM reference:
==
!=
=
<=
<
(The DM reference is accessed through "Help" -> "Hold On...", or simply by pushing F1)

And you need to indent everything in your verbs to within the verb, and not at the same indentation of the verb itself.
In response to Nielz
Admin.dm:895:error:M.Cert1:duplicate definition
Admin.dm:895:error:0:duplicate definition
Admin.dm:895:error:== :instruction not allowed here
Admin.dm:895:error::empty type name (indentation error?)
Admin.dm:896:error:M.Cert1:undefined var
Admin.dm:897:error:M:duplicate definition
Admin.dm:897:error:"<font size=3><font color=red>You have been rewarded with Certification Level One. Congratulations.":duplicate definition
Admin.dm:897:error:<< :instruction not allowed here
Admin.dm:896:error::empty type name (indentation error?)
Admin.dm:884:error:Certification2 :undefined proc
Admin.dm:891:error:Certification1 :undefined proc


I indented it correctly, and got that.
In response to Xorbah
= is a definition, == is comparison.

Its been said before, NOW GO READ THE MANUAL!
In response to Xorbah
The orignal indentation looked fine to me. Post your new code/
In response to Xorbah
Page: 1 2