Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1164

Lua Labs • on_event context does not give me

$
0
0
Hi, my code here:

Code:

local function attack_start_event(ctx)    less_random_tmp_att = ctx.weapon.damage    less_random_tmp_def = ctx.second_weapon.damageendon_event("attack", attack_start_event)
The error says that "weapon" is a nil value. It also said so if i "data" is a nil value i tried "ctx.data.weapon.damage".
Can somebody help mE?

Statistics: Posted by B099 — Yesterday, 7:19 pm



Viewing all articles
Browse latest Browse all 1164

Trending Articles