Echoes of the Imperium (4X Strategy Game)

Show off your games, demos and other (playable) creations.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by bartbes »

Looks awesome.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by Robin »

I keep getting errors:

Code: Select all

Error: [string "client.lua"]:43: bad argument #1 to 'len' (string expected, got nil)
stack traceback:
	[C]: in function 'len'
	[string "client.lua"]:43: in function 'CheckPreformed'
	[string "client.lua"]:60: in function 'callback'
	[string "LUBE.lua"]:318: in function 'update'
	[string "main.lua"]:155: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
You should probably use # instead of string.len, by the way.
Help us help you: attach a .love.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: 4X Space Game (Tech Demo Released)

Post by Lap »

Robin wrote:I keep getting errors:

Code: Select all

Error: [string "client.lua"]:43: bad argument #1 to 'len' (string expected, got nil)
stack traceback:
	[C]: in function 'len'
	[string "client.lua"]:43: in function 'CheckPreformed'
	[string "client.lua"]:60: in function 'callback'
	[string "LUBE.lua"]:318: in function 'update'
	[string "main.lua"]:155: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
You should probably use # instead of string.len, by the way.
Any reason that string.len even exists then? Also, what code are you using anyways? The only one I've updated in months is the code off the SVN.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by slime »

The # operator was added in Lua 5.1, and replaces string.len and table.getn. If you've been reading the online version of Programming in Lua, it is written for Lua 5.0 (Lua 5.1 came out in 2006 IIRC), so many parts of it are out of date/no longer valid.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: 4X Space Game (Tech Demo Released)

Post by Lap »

I guess I've just been adverse to using it because I have so many dictionary tables and numbered tables with gaps that I have to use a custom table.Count() instead of # to get an accurate number. Never even knew I could use it for strings. Find and Replace in files FTW.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by Robin »

Lap wrote:Also, what code are you using anyways? The only one I've updated in months is the code off the SVN.
I got the code straight from SVN trunk.
Help us help you: attach a .love.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: 4X Space Game (Tech Demo Released)

Post by Lap »

Apparently I didn't commit that last fix. It's on the SVN. However, that just brings up another problem...

If you are seeing that error at all it means that some how you are dropping packets from yourself. That shouldn't happen on a localhost and isn't something I've been able replicate without artificially modding my rate through the roof.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by Robin »

Huh. To be honest, I have no idea what I had been doing. I just clicked some buttons and then it crashed. :P
Help us help you: attach a .love.
User avatar
Lap
Party member
Posts: 256
Joined: Fri Apr 30, 2010 3:46 pm

Re: 4X Space Game (Tech Demo Released)

Post by Lap »

Just try singleplayer->quickstart. I'm always screwing around with the other options experimenting with stuff. I break a lot of the other options fairly frequently. I don't have enough foolproof safeguards in place for people just randomly trying to throw up a server or map yet without knowing what they are doing.
Last edited by Lap on Thu Apr 28, 2011 9:21 pm, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 4X Space Game (Tech Demo Released)

Post by Robin »

I actually tried that first. It crashed. :(
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests