Forum

> > CS2D > Scripts > its about my vampire lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English its about my vampire lua

1 reply
To the start Previous 1 Next To the start

old its about my vampire lua

haha1955
User Off Offline

Quote
i have a problem with my vampire lua, this error stop to work the lua. im happy if any help me to fix this problem:)

1
LUA ERROR: sys/lua/autorun/vampire.lua:56: attempt to index field 'vampire' (a nil value)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function hc.vampire.key_hook(p, key, state)
	if is_vampire(p) and key == 'space' then
		if state == 0 and is_flying(p) then
			hc.players[p].vampire.flying = false
		end
		if state == 1 then
			if can_start_fly(p) then
				hc.players[p].vampire.flying = true
			else
				hc.error(p, 'You\'ve ran out of stamina!')
			end
		end
	end
end
edited 1×, last 30.12.19 10:23:18 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview