Code:
Problem description:
The line is
del()
var/obj/gold/G = new(loc)
G.amount = rand(1,100)
..()
can anyone please explain to me what I typed wrong? it gave me six errors. This is part of a string from "Zilal's Beginners tutorial". Unfortunatley, I cannot find any way to contact him. Thanks for your time.
ID:145673
Jan 22 2006, 5:20 am
|
|
Jan 22 2006, 5:47 am
|
|
Put it between
|
If you're doing that for a client, it's Del() not del().
As Mysame pointed out, in the future, put code between DM tags. <DM> *Code* </DM> Also, it's always useful to see the full path of what you're doing. We don't know what del() belongs to. A mob? Obj? Turf? Area?! And finally, always tell us what the errors are - we're not mind readers! |
The line is del() I see something: Del() del() is the proc to actively destroy something, Del() is the proc that's automatically called when you del() something. If it shows up in blue, you can't make it the first line of a verb or proc declaration, as far as I know there are no exceptions. There are quite a few predefined procs that you can modify (ex: Del(), Click(), New()) but they appear in black. I find that this helps me find those modifiable predefined procs without having to memorize them: http://www.byond.com/docs/ref/info.html#/list/proc/Cut --Vito |
In response to DeathAwaitsU
|
|
Well, I am trying to create a gold device, I made the blueprint for it, and now I was making it so that you could collect it (I think that is what the guide said that did) and the errors are:
loading Testworld.dme Testworld.dm:44:error::empty type name (indentation error?) Testworld.dm:44:error:del :instruction not allowed here Testworld.dm:45:error:G :unknown variable type Testworld.dm:45:error:= :expected a constant expression Testworld.dm:46:error:G.amount:undefined type: G.amount Testworld.dm:45:error::empty type name (indentation error?) Testworld.dmb - 6 errors, 0 warnings (double-click on an error to jump to it) They are all in that section. Perhaps I need to find a program that teaches this coding visually? I can't seem to always follow the process with just examples and just showing what you need. Well, I am glad that there are some nice people to help on this board :). |