ID:141582
 
To the Almighty Elders that know of all coding!*bows respectfully*


Code:

Below is the code im having trouble with...
client/Topic(href,href_list[])
var/item_sell = href_list["sell"]
if(item_sell)
var/obj/i = item_sell //this line?
usr << "Pleasure Doing Business"
usr.wealth += i.value
del i
usr.shopkeeper:Shopkeeper2()



Below is the Html that the code above relates to...
                    for(var/obj/A in usr.contents)
html += {"

<font color=#C0C0C0><tr><td align = "center">
[A.name]</td><br>
<td align = "center">Value :
[A.value] Credits</td>
<td align = "center"><a href='?src=\ref
[usr];sell=[A.type];action=sell'>Sell!</a></td><br>
</tr><br>
"}


Problem description:

When run i get the runtime error:
"runtime error: Cannot read "/obj/Cloaks/Sodan_Cloak".value
proc name: Topic (/client/Topic)
usr: Tyr (/mob)
src: Gamer1 (/client)
call stack:
Gamer1 (/client): Topic("src=\[0x3000050];sell=/obj/Clo...", /list (/list), Tyr (/mob))"
When i try to sell my sodan cloak for example.
ive noted what line i believe the problem to be, maybe "i" isnt defined properly??? Anyway, ive tryed everything. Im not a professional -or even moderatly okay- at html so ive tryed a few things to no success.

Any help appreciated :D

Gamer1.
If you check your HTML, the "sell" object is not an object, but a type.
//Try this instead:
var/obj/i=locate(item_sell)in usr
//Now i will be an object of type i because item_sell is a type path, not an actual object.
In response to Kaiochao
I changed the line but now it just comes up
"cannot read null.value"
I took the wealth+value line out and it still fails to even delete the "i".
I really havnt a clue what could be wrong now, at first i thought my value var was in the wrong place, but if it doesnt "del i" either then i dont think its my var...is it?
In response to Gamer1
Hmm, try locate(text2type(item_sell))
In response to Kaiochao
error:text2type:undefined proc ?
In response to Gamer1
Agh, brain fart. text2path().
In response to Kaiochao
rofl, YAY it works. Thanks Almighty Elder *Bows Respectively*