ID:149463
 
When i make it so that once you step on a turf it teleports you somewhere, and the user sets it, it teleports you to seomthwere like null,null,null =P see code below:

turf
grass
icon = 'grass1.dmi'
New(loc)

if(rand(0,1))
icon = pick('grass2.dmi','grass3.dmi','grass4.dmi','grass5.dmi','gr ass6.dmi','grass7.dmi','grass8.dmi','grass9.dmi','grass10.dm i')
else
icon = 'grass1.dmi'

return ..(loc)

Click()
if(usr.clearareaon == 1)

del(src)
new /turf/placer
if(usr.linkeron == 1)
usr <<"give coordinates please.(x then y... then the x and y of the map coords... see help.)"
src.issetlinking = 1

src.coorda = input("x coord.",
"x coord")
src.coordb = input("y coord.",
"y coord")
src.coordc = input("'z'(for map) coord.",
"'z'(for map) coord")
Entered(O)
if(src.issetlinking == 1)
usr.loc = locate(src.coorda,src.coordb,src.coordc)
usr<<"[src.coorda],[src.coordb],[src.coordc]"
usr << "[usr.loc]"
ok, first of usr.loca etcetera, is a STRING!!!! use the [] thingies to block it off, i THINK....


PLEASE, PLEASE!!! i beg of you learn how to block in strings, it will make your BYOND career a lot less error-full!
In response to Ter13
Ter13 wrote:
ok, first of usr.loca etcetera, is a STRING!!!! use the [] thingies to block it off, i THINK....


PLEASE, PLEASE!!! i beg of you learn how to block in strings, it will make your BYOND career a lot less error-full!

A prerequisite to putting down someone else's code is that you actually know what you're talking about and make sense doing it. Apparently you fulfill neither requirement.

I have no idea what you're on about, but from what little I can glean from what you said, you couldn't be more wrong if you were accidentally offering advice on gardening.

Lummox JR
In response to Lummox JR
I am going to have to agree with Lummox JR.
In response to Lummox JR
Belligerent-Nonsense-to-English translation:

"The default type for an input() command is text. You're getting coorda, coordb, coordc as text values and then plugging those into a locate(x, y, z) statement which is looking for numbers."

The actual solution has nothing to do with the [] string notation; that's for embedding numerical values in strings, and won't help you turn a string into a number. The solution is to add "as text" after each input() call, which will fix this problem AND prevent people from asking to move to x-coordinate "yellow" or "gokuroxors".
In response to Lummox JR
Heh, reminded me of the guy's response to Adam Sandler's response near the end of Billy Madison.

-James
In response to Jmurph
Jmurph wrote:
Heh, reminded me of the guy's response to Adam Sandler's response near the end of Billy Madison.

I don't remember the exact quote, but I recorded it one in a .wav file. That line is an absolute delight.

I found this on a Web site, and hope it's accurate:

"What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul."

Lummox JR
In response to Winbiko
yes, me too, as i look back on thjis, this is the dumbest NON-Drug induced thing i have ever said........ maybe i had better get some sleep?
In response to Ter13
Thanks Leftley! heh, they code problem was stumping me for like 2 months!
In response to Leftley
The solution is to add "as text" after each input() call, which will fix this problem AND prevent people from asking to move to x-coordinate "yellow" or "gokuroxors".

You mean "as num", don't you?