mob/Bump(atom/A)
if(istype(A,/mob/counter))
A:shop(src)
mob/merchant
proc/shop(mob/M)
switch(input(M,"What do you want to do?","Shop")in list("Buy","Sell","Leave")
if("Buy") //It says missing , or )
if("Sell")
if("Leave")
alert(M,"Allright, come back again.","Shop")
f("Sell")
var/obj/O=input(M,"What do you want to sell?","Shop")in M.contents
if(alert(M,"I will buy the [O.name] for [O.price/2]. Do you want to sell it to me?","Shop","Yes","No")=="Yes")
M.money+=O.price/2
del(O)
alert(M,"Thank you.","Shop")
else
alert(M,"Allright then.","Shop")
shop(M)
verb
look()
usr << "You see:"
for(var/O as obj|mob in oview())
usr << "\a [O]"
ID:261801
Jul 17 2003, 7:05 pm
|
|
#2 Jul 17 2003, 8:55 pm
|
||
| ||
Branks wrote:
Thanks that helped alot but now there is another error maybe ya can help again i would like it a bunch ^_^ well here is the error ----> Dragon Warrior Omega.dm:286:error: proc definition not allowed inside another proc mob/Bump(atom/A) if(istype(A,/mob/counter)) //says no proc inside another A:shop(src) mob/merchant | ||
<dm>
My code here.
</dm>
That appears:
Count your ()'s in the switch statement. You need to add a ).