Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
/VM/station wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
SS13 for experienced programmers
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=====Complex definitions===== The general syntax is [http://www.byond.com/members/?command=reference&path=var var/type/variable_name = value] Examples: var/obj/item/I = new/obj/item [http://www.byond.com/members/?command=reference&path=operator%2F%40dt%3B I.name] = "Some item" Datum definition and declaration of a variable of that datum type: datum/test_datum var/test_variable = 0 //declaration of the test_variable var proc/set_as(var/i) //proc definition within the test_datum datum test_variable = i //set the test_variable var to the value in the argument var/datum/test_datum/TD = new/datum/test_datum //TD will now be a reference to a datum of type test_datum TD.test_variable = 4 //Byond doesn't know of private variables, so you can set any variables like this [http://www.byond.com/members/?command=reference&path=world world] [http://www.byond.com/members/?command=reference&path=operator%2F%26lt%3B%26lt%3B <<] TD.test_variable //will output 4 to all connected users TD.set_as(10) //Will call the set_as proc in the datum with the argument 10 TD.test_variable //will output 10 to all connected users
Summary:
Please note that all contributions to /VM/station wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
/VM/station wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width