Declare_War(T as text, M as mob in world)
{
world << "[usr] has declared war on [M]! Casus belli: [T].";
var/War/W = new/War(usr, M);
usr.wars.Add(W); // Error
}
mob/nation
{
var
{
.
.
.
list/wars[4];
}
}
Problem description:
When I try to compile, the last line (flagged with error) gives the following error: verbs.dm:28:error:usr.wars.Add:undefined var.
The verb is defined under type /mob/nation (the player mob).
Note: the periods are simply to avoid posting irrelevant code.
The problem's probably obvious, but I'm extremely out of practice in DM coding.
Any help would be appreciated.
Because normally it shouldn't error, as long as the verb is defined under /mob/nation
Alternatively you could try to add;