gold
name = "Gold"
icon = 'objs.dmi'
icon_state = "gold"
verb/Get()
set src in oview(1)
usr << "You pick up the gold!"
usr.gold += rand ("1,10")
the problem is when you click get, it says you pick up the gold but the obj remains on the ground and your gold doesnt go up? help please.
ID:173347
Jan 14 2004, 2:05 pm
|
|
alright whats wrong now?
senzubean name = "Senzu Bean" icon = 'objs.dmi' icon_state = "senzu" verb Get() set src in oview(1) usr << "You get the Senzu Bean!" src.contents += senzubean verb Eat() set src in oview(1) usr << "You eat the Senzu Bean!" usr.powerlevel += 200 mob/var/senzubean it says senzubean is unidentifyed var |
In response to Majinveku
|
|
Don't define a var called "senzubean". It won't do anything in this case. What you want to do is use the built-in var src.
Obj verbs like that can just use src to refer to the object. So instead of referring to "senzubean" in those procs, use "src". |
In response to Crispy
|
|
obj
zenni name="Zenni" icon='objs.dmi' icon_state = "zenni" verb Get() set src in oview(0) usr << "You get [src] zenni." usr:zenni += rand(1,10) del(src) well heres the new code... so uhhh now it says you get Zenni Zenni how do I make it say you get # zenni? |
In response to Majinveku
|
|
What you need to do is determing the random number first. Create a var in your ver, eg var/zenniamount. Then set it to the results from the rand() proc, similar to how you already have the rand(). Then, instead of [src], use [zenniamount] or whatever you called the variable. Then instead of increasing usr.zenni by the results from a rand(), increase it by zenniamount, or whatever you called that var.
|
In response to Jon88
|
|
hi my name is antonio my key is antonio123 i need help putin up one of my games. plz help me out i will do byond alot of good because i put over 50 or more pll on byond.com i like to have my game on fan game plz e-mail is Thaddeustami thaxx u very much:)
|
In response to Antonio123
|
|
Learn to spell, learn grammar, then learn not to hijack threads.
|
In response to Antonio123
|
|
Antonio123 wrote:
hi my name is antonio my key is antonio123 We can see your key at the top of the post. i need help putin up one of my games. What do you mean? plz help me out i will do byond alot of good because i put over 50 or more pll on byond.com How will you do BYOND a lot of good because of a past action? i like to have my game on fan game plz ...Then why do you need help putting it up? e-mail is Thaddeustami [email protected]? thaxx u very much:) I don't want thaxxed, not at all. |
Why doesn't the gold go up? Well, look at how you're using rand(). See those double quotes around "1,10"? You don't want them there. They're numbers, so you don't want to quote them. Only text gets quoted.