No. OS X doesn't care about case in filenames either. Unless you format your HD as case sensitive UNIX which no normal user does on purpose. Linux might, but again, only if you format your HD as case sensitive UNIX.kikito wrote:The file was named images/Tiles/Units/eco.gif - notice the lowercase. Windows doesn't care about letter case on files (ECO=eco for him), but mac/ubuntu do. I guess ZIP also does. That must be why it was working on uncompressed windows, but not on the .love file.
Proto-RTS
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Proto-RTS
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Proto-RTS
Ext2/3/4 is case-sensitive.
And, most importantly, PhysFS is, so love is, just watch your case.
And, most importantly, PhysFS is, so love is, just watch your case.
Re: Proto-RTS
Yeah, fixed it now. It was caused by me changing the filename to lowercase and forgetting the sprite was loaded in game, as I aren't drawing any units yet, so I wasn't looking at the table. Cheers for the heads up.
Working on plains trees now, then I'll get units done, but I'm leaving soon, so it probably wont get touched much till tonight.
Working on plains trees now, then I'll get units done, but I'm leaving soon, so it probably wont get touched much till tonight.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Proto-RTS
I always watch my case out of habit anyway since web URL's are case-sensitive.
Re: Proto-RTS
I'm having issues with the update function.
In love.update, I'm doing
and when i make a tree object, i do
The problem is that it isn't running the function at all.
Where am I going wrong? I can define the function elsewhere and force it to run on the object, but that's not any fun at all, as it makes all my planned AI routines into spaghetti code, rather than nice unit:update() or unit:move() or whatevers. Help?
In love.update, I'm doing
Code: Select all
for k,v in ipairs(vegetation) do
v:update()
end
Code: Select all
function tree:update()
--lots of functiony stuff that doesnt error at all
end
Where am I going wrong? I can define the function elsewhere and force it to run on the object, but that's not any fun at all, as it makes all my planned AI routines into spaghetti code, rather than nice unit:update() or unit:move() or whatevers. Help?
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Proto-RTS
What happens if you do this?
Does it print 1 message per vegetable? If not, then the issue must be on the for loop itself.
One quick thing you can try in this case is replacing ipairs by pairs. The former tends to be a bit "picky" about the tables it parses.
Code: Select all
for k,v in ipairs(vegetation) do
print('updating vegetable no. ' .. k)
v:update()
end
One quick thing you can try in this case is replacing ipairs by pairs. The former tends to be a bit "picky" about the tables it parses.
When I write def I mean function.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Proto-RTS
Just sprawling a lot of print()s around usually helps to point down the problem, yes.kikito wrote:What happens if you do this?Code: Select all
for k,v in ipairs(vegetation) do print('updating vegetable no. ' .. k) v:update() end
Before anyone thinks this is black magic: ipairs is sorted, pairs is unsorted, k, v in ipairs(t) is equivalent to this:kikito wrote:One quick thing you can try in this case is replacing ipairs by pairs. The former tends to be a bit "picky" about the tables it parses.
Code: Select all
do
local k = 1
local v = t[k]
while v ~= nil do
--do your thing
k = k + 1
v = t[k]
end
end
Code: Select all
do
local k, v = next(t)
while v ~= nil do
--do your thing
k, v = next(t, k)
end
end
Help us help you: attach a .love.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Proto-RTS
Good point.
The next() function is totally black magic, however.
(Just kidding)
The next() function is totally black magic, however.
(Just kidding)
When I write def I mean function.
Re: Proto-RTS
Hooray! It was idiocy on my part. Expect good things next update.
Thanks guys, I usually spam prints everywhere but I didn't think I'd be dumb enough to put the objects in the wrong table. Typos <_<
Anyway, cheers.
Thanks guys, I usually spam prints everywhere but I didn't think I'd be dumb enough to put the objects in the wrong table. Typos <_<
Anyway, cheers.
Re: Proto-RTS
Sorry for the double post, just informing you that there wont be an update tonight, but I've gotten a lot more things working (I just need to clean it all up for then v0.4 release)
Quick vote, yes or no for unit implementation before v0.4?
Quick vote, yes or no for unit implementation before v0.4?
Who is online
Users browsing this forum: Amazon [Bot] and 10 guests