Echoes of the Imperium (4X Strategy Game)
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: 4X Space Game (Tech Demo Released)
Looks awesome.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 4X Space Game (Tech Demo Released)
I keep getting errors:
You should probably use # instead of string.len, by the way.
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'
Help us help you: attach a .love.
Re: 4X Space Game (Tech Demo Released)
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.Robin wrote:I keep getting errors:You should probably use # instead of string.len, by the way.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'
- 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)
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.
Re: 4X Space Game (Tech Demo Released)
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.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 4X Space Game (Tech Demo Released)
I got the code straight from SVN trunk.Lap wrote:Also, what code are you using anyways? The only one I've updated in months is the code off the SVN.
Help us help you: attach a .love.
Re: 4X Space Game (Tech Demo Released)
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.
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.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 4X Space Game (Tech Demo Released)
Huh. To be honest, I have no idea what I had been doing. I just clicked some buttons and then it crashed.
Help us help you: attach a .love.
Re: 4X Space Game (Tech Demo Released)
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.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: 4X Space Game (Tech Demo Released)
I actually tried that first. It crashed.
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 47 guests