Search found 3 matches

by Ultra7
Wed Jul 17, 2013 4:37 pm
Forum: Support and Development
Topic: Inserting variable into table name
Replies: 4
Views: 1328

Re: Inserting variable into table name

Really thank you for all of your help. Helped me a lot. :awesome:
by Ultra7
Wed Jul 17, 2013 1:38 pm
Forum: Support and Development
Topic: Inserting variable into table name
Replies: 4
Views: 1328

Re: Inserting variable into table name

Thanks for a fast reply. I need to make a code that makes a table called "x1y2" (with letters x and y in the name). Why I need this? I want to make a sideway scrolling 2d platformer sort of that uses tiled maps. Map files would be made of a lot of grid.spawn(x,y,id) functions, when you load a map, i...
by Ultra7
Wed Jul 17, 2013 12:14 pm
Forum: Support and Development
Topic: Inserting variable into table name
Replies: 4
Views: 1328

Inserting variable into table name

Hi, I'm really new to Löve and programming and i have a really small problem (i think). My code: grid = {} blocks = {} function grid.spawn( x,y,id ) blocks = {xy = {id = id}} end My prblem is that i want to place a variable inside a table name i.e. when function grid.spawn(1,2,3) gets called in love...