Ok, heres the fishing code for a new game i plan on making... water
icon = 'turfs.dmi'
icon_state = "water"
density = 1
verb
fish()
set category = "Fishing"
set src in view(1)
var/fish = rand(1,4)
if(fish == 1) usr << "You catch a fish!"
new/obj/fish(usr)
if(fish == 2) usr << "You Fail to catch anything!"
if(fish == 3) usr << "You Fail to catch anything!"
if(fish == 4) usr << "You Fail to catch anything!"
obj
fish
icon = 'turfs.dmi'
icon_state = "fish"
verb
get()
set category = "Inventory"
set src in oview(1)
src.Move(usr)
drop()
set category = "Inventory"
src.Move(usr.loc)
eat()
set category = "Inventory"
usr <<"[usr]: Mmmm Mmmm Good!"
heres the errors
loading AllYouNeedDemo.dme
fishing.dm:10:error:rand:undefined proc
fishing.dm:11:error::invalid expression
fishing.dm:10:fish :warning: variable defined but not used
AllYouNeedDemo.dmb - 2 errors, 1 warning (double-click on an error to jump to it)
how can i fix this? Or if you don't, is there a way around it that does the same thing?
ID:148735
![]() Oct 21 2002, 12:25 am
|
|
change if(fish == 1) to if(1)
change the other if(fish == whatever) to one if: if(0)