Forum

> > CS2D > Scripts > attemp to index field '?' (a nil value)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch attemp to index field '?' (a nil value)

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt attemp to index field '?' (a nil value)

D-D3ADxPro
User Off Offline

Zitieren
Using NaSH's paintball 3 script. Pressed F2 in game, and it wont open the menu. Checked console and here was the error that it displayed:

1
LUA ERROR: maps/Pb_de_dust_night:543: attempt to index field '?' (a nil value)

Here is the script with the error:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
addhook("serveraction","onserveraction")
function onserveraction(id,action)
	if action == 1 then
	local captions = {}
	for i = 1,9 do
		if paintgun[i] == "" then
			captions[i] = ""
		 else
			captions[i] = paintgun[i][1].."|Ammo: "..paintgun[i][4].." / Distance: "..paintgun[i][3].." / Speed: "..paintgun[i][5].." / Weight: "..paintgun[i][6] --paintgun[i][1] --LINE 543--
		end
	end
		menu(id,pbgame_pgmenutitle.."@b,"..
		captions[1]..","..
		captions[2]..","..
		captions[3]..","..
		captions[4]..","..
		captions[5]..","..
		captions[6]..","..
		captions[7]..","..
		captions[8]..","..
		captions[9])
	elseif action == 2 then
		instructions(id)
	end
end
Line 9 is (LINE 543!)

Does anyone know how to fix this error?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht