Wysłany: 2018-01-28, 16:51
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Witam, wyskakuje b??d w kodzie:
Kod: bad argument #1 to 'insert' (table expected, got boolean)
Nie mam poj?cia jak to naprawi?, pr?bowa?em na r??ne sposoby, mo?e Wy co? zdzia?acie?
addEvent ( "barierki" , true )
addEventHandler ( "barierki" , root , function ( typ )
local x , y , z = getElementPosition ( source )
local rotX , rotY , rotZ = getElementRotation ( source )
rbs = getElementData ( source , "barriers" ) or {}
if typ == "barierka" then
barierka = createObject ( 1459 , x , y , z - 0.5 , rotX , rotY , rotZ )
triggerClientEvent ( root , "setBreakable" , root , barierka )
table . insert ( rbs , barierka ) -- wskazuje na t ? linijk ?
setElementData ( source , "barriers" , rbs )
-- i endy
Za pomoc piwko i respekt!
Wysłany: 2018-01-28, 21:00
neku^
Wiek: 24 Na forum: 3521 dni Posty: 461
Nick w MP: neku^
Piwa : 1186
najwidoczniej "rbs" to nie tabela, wy?wietl sobie iprint(rbs) i zobacz co Ci pisze
Wysłany: 2018-01-28, 21:33
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Wysłany: 2018-01-28, 21:36
psychol.
Wiek: 23 Na forum: 3502 dni Posty: 225
Nick w MP: psychol.
Piwa : 2998
"Kalizman" napisał/a :
Nie lepiej zrobi? tabele zamiast date?
Na przyk?ad:
Potem sobie dasz:
if not bariery [ player ] then
bariery [ player ] = {}
end
table . insert ( bariery [ player ], bariera )
Tagi: insert
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: