ID:276906
 
Nah, not really. If you're computer/network savvy you may be able to figure what I do by looking at my key. I've been looking through the forums for quite a while now and as I am now sure that BYOND is not malware I have decided to install it on my computer.

I've read some of the DM guide and it seems very similar to C++, does anyone have any pointers on how to stay clear of errors in DM projects?
practice, patience, and experience.
In response to digitalmouse
And avoid ripped source code like the plague.
In response to Foomer
127.0.0.1 isn't even a real ip.
In response to Mysame
127.0.0.1 is the standard IP address used for a loopback network connection.

This means that if you try to connect to 127.0.0.1, you are immediately looped back to your own machine.

If you telnet, ftp, etc... to 127.0.0.1, you are connected to your own machine.

In other words, 127.0.0.1 is you.
In response to Foomer
The joke here is that script kiddies don't know what 127.0.0.1 is, and when told it is an IP address, they will put it into whatever crack programs they might have. This causing their plan to backfire.
In response to Scoobert
Scoobert wrote:
The joke here is that script kiddies don't know what 127.0.0.1 is, and when told it is an IP address, they will put it into whatever crack programs they might have. This causing their plan to backfire.

I've actually tricked a few 'crackers' by telling them that was my IP!
In response to IP 127.0.0.1
Hmm, I didn't even think those kind of characters would even be allowed in a key name.

I'm curious, whats your ckey?
ip127001?
In response to Flame Sage
nope it actually is ip127.0.0.1
In response to IP 127.0.0.1
127.0.0.1 = Localhost

But then again, it's not like any of you here didn't know that.


Like foomer DigitalMouse said, patience and experience... I don't imagine that to be unlike other programming languages.

And I guess there's only one way to gain that experience. Start a project! >=D
In response to D4RK3 54B3R
D4RK3 54B3R wrote:
Like foomer said, patience and experience...

??? :(
In response to Foomer
Doesn't that work with any number between the 127 and 1? Like 127.68.231.1, or 127.178.3.1, etc. I remember hearing that it would do the same thing, and while a number of people recognize the 127.0.0.1 number more would likely slip up if given a second false number like that.
In response to Scoobert
Scoobert wrote:
The joke here is that script kiddies don't know what 127.0.0.1 is, and when told it is an IP address, they will put it into whatever crack programs they might have. This causing their plan to backfire.

The great thing about IPv6 is having all addresses in hex, so those who can remember "127.0.0.1 = bad" will become confused once more! :)
In response to Sarm
Sarm wrote:
Doesn't that work with any number between the 127 and 1?

In theory, any IP address starting with 127 is supposed to work:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Chris>ping 127.45.16.3

Pinging 127.45.16.3 with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
[snip]


Note that I sent the ping to 127.45.16.3 and got a reply from 127.0.0.1.

I have heard reports that this doesn't work on all systems, though.

Anyway, welcome, Mr Localhost. =)
In response to Crispy
<code>Last login: Mon May 29 22:21:22 on ttyp1 Welcome to Darwin! elite-2:~ maz$ ping 127.90.13.37 PING 127.90.13.37 (127.90.13.37): 56 data bytes ^C --- 127.90.13.37 ping statistics --- 17 packets transmitted, 0 packets received, 100% packet loss </code>

Aww ;)
IP 127.0.0.1 wrote:
I've read some of the DM guide and it seems very similar to C++, does anyone have any pointers on how to stay clear of errors in DM projects?

As long as you are familiar with other programming languages, especially object-oriented ones, Byond's language should be extremely simple. Untyped variables are variants, and any variable can hold any data without problem. That and its use of indentation as the actual syntax element for scope are two things that make it easy to work with.

For an example of the variables I mentioned, take a look at the following...
MyCustomClass
var/name

proc/MyFunction() //the proc keyword defines something as a function
var/list/MyList = list(5, "tester", new/MyCustomClass, null)
var/MyCustomClass/MyObj = input("")in MyList
//Using input in the above way brings up a prompt showing the list of items for you to choose from
if(istype(MyObj, /MyCustomClass))
world << MyObj.Name

Of course, in practice you will usually not disregard your variable types quite like that. Rather, I'm just showing how flexible the language is.

In many cases it will adapt to what you need. For example, the input function displays a prompt to a user and asks for some input of whatever type you specify. The "input()in list" style I used in my example displays a list wherein the elements of the list are all shown and you can select one. If an element is an object derived from type /atom, it displays the object's name variable (a built in variable for that type) to represent it. Now, if you have your own created types of objects, normally they wouldn't be supported; but if you just give them a name variable it will automatically adjust and represent them in the same way.

Likewise, objects embedded in text strings display their name variables (though modified by text macros, something you can read up about in the help file of the Dream Maker program), and the same functionality applies here if you give something a name variable.

Enough of my ranting about the ease of use though. As for staying clear of errors...

Byond uses the == as comparison operator, as opposed to = being used for everything like in some languages.
proc/MyFunction()
var/n
n = 4
if(n == 4)

Because of the indentation style, there are no "end if" "wend" "next" or other such keywords for if-statements, while-loops, for-loops and so on, nor are there enclosing brackets. However, you can use a limited C++ style for some things if you come from using C++ and would prefer it. For example
var/global_variable = 5

proc/Function()
if(global_variable == 5)
global_variable = 1
SomeFunction()
Function()

is the same as
var global_variable = 5;

proc/Function()
{
if(global_variable == 5){global_variable = 1; SomeFunction();}
Function();
return 0;
}

One common mistake is treating type paths as though they were objects. Some people try to do the following.
GrandparentClass
ParentClass
var/list/kids[0]
ChildClass
var
ma; pa
nickname

proc/MyFunction()
var/MyVar = /GrandparentClass/ParentClass/ChildClass
MyVar.nickname = "Bubba"

Another thing; objects (objects of type /list, /client, /savefile, /world, /datum, and derived types) are passed by reference to functions while everything else is passed by value.

One last thing I can think of before I go; there is an object limit. If you plan to build some extremely massive world, keep in mind that internal referencing of objects limits them to a 2-byte unique identifier and therefor objects are limited to 65,000. Some things have their own identifier sets and therefor their own seperate limit counts though. So you can have both 65,000 players running around (though, of course in reality you can't since Byond's player base isn't quite that high just yet) and also have 65,000 items between them at the same time, and 65,000 lists, and so on. With just a small amount of planning, however, you can get by with more objects than that by saving a bit of data for them and only creating a physical instance of the object as needed.

And that shall be the end of my babbling. Hope it was enlightening.
In response to Maz
The same thing happened to me, on Windows XP, because for the last number I used a two-digit number.

-Doh
In response to XxDohxX
XxDohxX wrote:
The same thing happened to me, on Windows XP, because for the last number I used a two-digit number.

I dispute the two-digit number claim:

C:\Documents and Settings\Chris>ping 127.90.13.37

Pinging 127.90.13.37 with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.90.13.37:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)


I just tried it on an UltraSPARC machine at uni and it doesn't work there.

I think it is just system-dependent. =)
Don't mix up usr and src. The root of most of my major errors is a stupid mixup.


--Vito