| 658 | } |
| 659 | |
| 660 | bool CScriptObject::GetAt(int nIdx, int &nVal) |
| 661 | { |
| 662 | _GUARD_STACK(m_pLS); |
| 663 | bool res = false; |
| 664 | if (!_GET_THIS()) |
| 665 | return false; |
| 666 | |
| 667 | if (lua_getn(m_pLS, - 1) < nIdx) |
| 668 | { |
| 669 | return false; |
| 670 | } |
| 671 | |
| 672 | lua_rawgeti(m_pLS, - 1, nIdx); |
| 673 | if (lua_isnumber(m_pLS, - 1)) |
| 674 | { |
| 675 | res = true; |
| 676 | nVal =(int)lua_tonumber(m_pLS, - 1); |
| 677 | } |
| 678 | return res; |
| 679 | } |
| 680 | |
| 681 | bool CScriptObject::GetAt(int nIdx, float &fVal) |
| 682 | { |
no test coverage detected