[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [LUA]: Cannot use userdata as table index
- From: Rob Kendrick <rjek@...>
- Date: Fri, 10 Jul 2015 16:44:28 +0100
On Sat, Jul 11, 2015 at 01:41:44AM +1000, Борис Александров wrote:
> Example code:
>
> " temp = {}
> temp['string'] = 'foobar'
> temp[GetPlayer(0)] = 'player'
> temp[GetEntity(0)] = 'entity'
>
> print(temp['string']) -- foobar
> print(temp[GetPlayer(0)]) -- nil
> print(temp[GetEntity(0)]) -- nil
What does the following display?
print(GetPlayer(0), GetPlayer(0))
B.