14 replies to this topic
#1
Posted 26 October 2013 - 09:48 AM
So, I am trying to make a simulation game, but I am having problems with some bugs that I can't figure out. Anyone care to check it out?
Raw code: pastebin
Raw code: pastebin
#2
Posted 26 October 2013 - 09:53 AM
Are you getting an error?
#3
Posted 26 October 2013 - 09:59 AM
Yes.
#5
Posted 26 October 2013 - 10:37 AM
After a quick read-thru, I noticed a potential issue: "activecat" and "elen" used on lines 69 & 70 are never initialized.
#6
Posted 26 October 2013 - 11:21 AM
sens, on 26 October 2013 - 10:37 AM, said:
After a quick read-thru, I noticed a potential issue: "activecat" and "elen" used on lines 69 & 70 are never initialized.
#7
Posted 26 October 2013 - 12:49 PM
*bump*
#8
Posted 27 October 2013 - 03:37 AM
The write command on line 69 is causing the error (if you add a .."" to the end of what you pass to those write functions, then they'll fail with more useful errors).
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
#9
Posted 27 October 2013 - 08:26 AM
Bomb Bloke, on 27 October 2013 - 03:37 AM, said:
The write command on line 69 is causing the error (if you add a .."" to the end of what you pass to those write functions, then they'll fail with more useful errors).
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
#10
Posted 27 October 2013 - 08:38 AM
Ziriee, on 27 October 2013 - 08:26 AM, said:
Bomb Bloke, on 27 October 2013 - 03:37 AM, said:
The write command on line 69 is causing the error (if you add a .."" to the end of what you pass to those write functions, then they'll fail with more useful errors).
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
It wants to write categoriesn[ i]["char"]. This value is set by whatever the third parameter you pass to the addCategory() function is, but when you're calling that function you're only passing two parameters: hence categoriesn[ i]["char"] is always set to nil and that write statement fails.
#11
Posted 27 October 2013 - 10:40 AM
I think you should put this check around the whole checkFallDown() function:
if map[y][x] > 0 then
if map[y][x] > 0 then
#12
Posted 27 October 2013 - 10:46 AM
sens, on 27 October 2013 - 10:40 AM, said:
if map[y][x] > 0 then
#13
Posted 27 October 2013 - 11:13 AM
I copied it right out of his pastebin, apparently formatting and all!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











