Forum

> > CS2D > Scripts > its about my vampire lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch its about my vampire lua

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt its about my vampire lua

haha1955
User Off Offline

Zitieren
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
1× editiert, zuletzt 30.12.19 22:23:18
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht