I'm trying to make a damage system, but i need some help.
I get this error: "usr.strength:undefined var"
Here's the part of the code that's not working:
mob
student
icon = 'student.dmi'
var
M
health = 100
strength = 3
intel = 2
damage
verb/Chat(msg as text)
world << "[usr] says: [msg]"
verb/Bash()
set src in oview(1)
damage = (usr.strength * 2) - src.intel
view() << "[usr] bashes [src] for [damage] points!"
Stat()
stat("health",health)
stat("Strength",strength)
stat("Intelligence",intel)
statpanel("Inventory",contents)
Copyright © 2025 BYOND Software.
All rights reserved.
Basically, using : instead of . tells the compiler that not all of its types have that variable.
-DogMan