Support My Blog
Download Free Games

What’s New in AMS 8

Hi,

If you want to use all the examples from AMS 5 to AMS 7.5 in your AMS 8 projects, please take note below.

AMS 8 is using an updated version of LUA 5.1. One of the most important change is the TABLE ITERATION.

This is the old code used in AMS 5 to AMS 7.5 for TABLE ITERATION ( loops )

-----------------------------------------------
mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end
-----------------------------------------------

If my examples are using LOOPS, you need to change like below:


----------------------------------------------
mytable = {"One","Two","Three"};

for k, v in pairs(mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end
----------------------------------------------

See the word “pairs” in red and the bracket, above?

Just add a BRACKET around your TABLE NAME and add the word “pairs“.

Then all my examples using loops will work.

lol ….. 99.9 % of my examples are using LOOPS.
You’ll definitely have to change the codes.

Hope this helps.

  • Share/Save/Bookmark

1 comment to What’s New in AMS 8

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>