From dc000fb43591919a347859f1c06e61bde347adc1 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 22 Sep 2016 12:05:25 -0400 Subject: [PATCH] SIGH Lua SIIGH. --- examples/usertype_simple.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/usertype_simple.cpp b/examples/usertype_simple.cpp index e2dcbfe8..4a50839f 100644 --- a/examples/usertype_simple.cpp +++ b/examples/usertype_simple.cpp @@ -66,14 +66,14 @@ g.data = mdata.third list3 = g:generate_list() print("From lua: ") -for i, v in pairs(list1) do - print("\tlist1[" .. i .. "] = " .. v) +for i, v in list1 do + print("\tlist1[" .. i .. "] = " .. list1[i]) end -for i, v in pairs(list2) do - print("\tlist2[" .. i .. "] = " .. v) +for i, v in list2 do + print("\tlist2[" .. i .. "] = " .. list2[i]) end -for i, v in pairs(list3) do - print("\tlist3[" .. i .. "] = " .. v) +for i, #t in list3 do + print("\tlist3[" .. i .. "] = " .. list3[i]) end )");