mob
verb
Go_Shop()
set category = "Misc."
set name = "Buy Items"
usr<<browse({"<BODY><HEAD><TITLE>Item Shop</TITLE></HEAD><BODY BGCOLOR = #f0e68c><center><font face = Tahoma><font color = red><small><b>Shopkeeper:</font></b><font color = brown>What would you like to buy today?<br><br>Money: $[usr.PrizeMoney]<br><br><a href='?src=\ref[src];action=buy;item=shoe icon;cost=50'>Shoe Icon</href>"},"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
mob/Topic(href,href_list[])
switch(href_list["action"])
if("buy")
var/item=href_list["item"]
var/cost=href_list["cost"]
usr<<browse({"<BODY><HEAD><TITLE>Item Shop</TITLE></HEAD><BODY BGCOLOR = #f0e68c><center><font face = Tahoma><font color = red><small><b>Shopkeeper:</font></b><font color = brown>The [item] costs $[cost].Accept?<br><br>Money: $[usr.PrizeMoney]<br><br><a href='?src=\ref[src];action=Ok;costbuy=[cost];itembuy=[item]'>Yes</href><br><a href='?src=\ref[src];action=No'>No</href>"},"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
if("Ok")
var/costbuy=href_list["costbuy"]
var/itembuy=href_list["itembuy"]
usr<<"Test"
if(usr.PrizeMoney>=costbuy)
usr<<"Test"
usr<<browse(null,"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
if(itembuy=="shoe icon")
usr.icons+="Shoe"
else
usr<<browse({"<BODY><HEAD><TITLE>Item Shop</TITLE></HEAD><BODY BGCOLOR = #f0e68c><center><font face = Tahoma><font color = red><small><b>Shopkeeper:</font></b><font color = brown>I'm sorry,you don't have enough money to buy that.Continue browsing?<br><br><a href='?src=\ref[src];action=Yes'>Yes</href><br><a href='?src=\ref[src];action=No'>No</href>"},"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
if("No")
usr<<browse(null,"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
if("Yes")
usr<<browse({"<BODY><HEAD><TITLE>Item Shop</TITLE></HEAD><BODY BGCOLOR = #f0e68c><center><font face = Tahoma><font color = red><small><b>Shopkeeper:</font></b><font color = brown>What would you like to buy today?<br><br>Money: $[usr.PrizeMoney]<br><br><a href='?src=\ref[src];action=shoe'>Shoe Icon</href><br><a href='?src=\ref[src];action=hat'>Hat Icon</href>"},"window=name;file=name;display=1;clear=1; size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
if("update")
Problem description:
I get this runtime error after I accept buying the item:
runtime error: type mismatch
proc name: Topic (/mob/Topic)
source file: Monopoly Online.dm,570
usr: Metamorphman (/mob)
src: Metamorphman (/mob)
call stack:
Metamorphman (/mob): Topic("src=\[0x3000000];action=Ok;cos...", /list (/list))
I really have no idea on this error so any help would be appreciated,thnx
Anyway, your problem, or by what I can see as least, is that your trying to add text to an icon. How does that work at all? What were you trying to do?