Search found 53 matches
- Sat Jan 09, 2010 8:26 am
- Forum: General
- Topic: This is the first real problem I've run into...
- Replies: 7
- Views: 2140
This is the first real problem I've run into...
So, I'm trying to create a simple tile map. I have this: z = { {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1, 0, 0}, {2, 2, 3, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {2, 2, 2, 2, 2, 2, 2, 3, 0, 0}, {0, 0, 0, 0, ...
- Sat Jan 09, 2010 7:41 am
- Forum: General
- Topic: More lua help
- Replies: 2
- Views: 1292
Re: More lua help
Thanks!
- Sat Jan 09, 2010 1:41 am
- Forum: General
- Topic: More lua help
- Replies: 2
- Views: 1292
More lua help
So, I have a table,
How do I call the different parts of the tables within "z"? For example, how get the third value in the second table (7) to use in a print function?
Many thanks!
Code: Select all
z = { {1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}
}
Many thanks!
- Sun Jan 03, 2010 9:00 pm
- Forum: General
- Topic: Please help a Lua newb?
- Replies: 4
- Views: 1687
Re: Please help a Lua newb?
Thanks! Now the code works, and I understand slightly more about ipairs.
- Sun Jan 03, 2010 8:36 pm
- Forum: General
- Topic: Please help a Lua newb?
- Replies: 4
- Views: 1687
Re: Please help a Lua newb?
Because x is set to 0 only once, so in the second frame it will be higher, however, the usual lua solution is: for i, v in ipairs(a) do love.graphics.print(v, 100+(x-1)*10, 150) end So, that sorta works. I don't get an error, but all the numbers are on top of one another. And I don't understand at ...
- Sun Jan 03, 2010 8:25 pm
- Forum: General
- Topic: Please help a Lua newb?
- Replies: 4
- Views: 1687
Please help a Lua newb?
So, just got started with Love, (and programming in general) so I don't know all that much about how Lua works. I'm experimenting with tables, and have run into a problem when trying to repeat something for each argument in a table. I'm trying to replicate what I have done in part A with part B, but...
- Thu Nov 12, 2009 12:44 am
- Forum: General
- Topic: Avatars: OBEY!
- Replies: 763
- Views: 1066261
Re: Avatars: OBEY!
OBEY...
- Wed Nov 11, 2009 6:48 pm
- Forum: General
- Topic: How large is the Love window?
- Replies: 2
- Views: 1375
- Wed Nov 11, 2009 6:45 pm
- Forum: General
- Topic: How large is the Love window?
- Replies: 2
- Views: 1375
How large is the Love window?
Title says it. What are the dimensions of the window Love runs in?
- Wed Nov 11, 2009 7:44 am
- Forum: General
- Topic: I need help with absolute values!
- Replies: 2
- Views: 3067
Re: I need help with absolute values!
*sigh* it seems like all of the problems I have with love are so simple to fix... I guess that's a good thing though.