<< Back to Programming Forum   Search

Posts 41 - 49 of 49   <<Prev   1  2  3  
New to programming?: 12/19/2012 23:42:25

unknownsoldier 
Level 57
Report
Fizzer - when creating game between unknownsoldier_with_a_vengeance\80abc & unknownsoldier, i get the error below - seems your API does not like the long game name?
Any suggestions? (maybe you make your API allow games names of length 2*max-player-name-length +10 or some such?

Thanks.

------------------------------------------------------------

warlight001/games.py in createGame

raise Exception("CreateGame returned error: " + apiRet.get('error', apiRetStr)) ...

▼ Local vars
Variable Value
apiRet
{u'error': u'StringTooLong', u'termsOfUse': u'Please use this API responsibly, as it can consume significant amounts of server resources if called excessively. Please see http://warlight.net/API for details on WarLight APIs. The format of this data feed may change in the future.'}
apiRetStr
'{\r\n "termsOfUse": "Please use this API responsibly, as it can consume significant amounts of server resources if called excessively. Please see http://warlight.net/API for details on WarLight APIs. The format of this data feed may change in the future.",\r\n "error": "StringTooLong"\r\n}\r\n'
config
<main.ClotConfig object at 0xb00d6ec>
gameName
u'unknownsoldier_II123 vs unknownsoldier_with_a_vengeance\x80abc'
gid
-1
p
7 unknownsoldier_with_a_vengeance\x80abc
players
(3 unknownsoldier_II123, 7 unknownsoldier_with_a_vengeance\x80abc)
templateID
251301
New to programming?: 12/19/2012 23:50:27

Fizzer 
Level 64

Warzone Creator
Report
Game names are limited to 50 characters. To truncate the name, change this:

gameName = ' vs '.join([p.name for p in players])

to this

gameName = ' vs '.join([p.name for p in players])[:50]

I just checked this into github
New to programming?: 12/20/2012 00:03:15

unknownsoldier 
Level 57
Report
OK, thanks.
New to programming?: 12/20/2012 02:35:12


Clifford The Big Red Dog 
Level 37
Report
Joined again
New to programming?: 12/20/2012 04:13:10

[WG] Reza
Level 60
Report
I got errors with the apex guys joining aswell the circle in their name gave them errors when leaving and joining.
But the main problem right now seems to be how the games dont start being made :\
(https://lolowuttestclot.appspot.com/) (no more people needed :) )
New to programming?: 12/20/2012 06:02:07


Kenny • apex 
Level 59
Report
I have no idea why Fizzer, but cron.yaml kept on giving me errors until I deleted all of your # side text. I cleaned it up to just have this:

cron:
- description: create game
url: /cron
schedule: every 6 hours

^-- No tab, and indentation the same. No side text. Finally worked perfectly. For those of you having the same issue just remember: Don't go below every 3 hours since you'll put a strain on the WL servers. If you read and understand that, but for some reason the cron job doesn't want to work with his side text, remove it.

Otherwise, it's smooth sailing so far.
New to programming?: 12/20/2012 23:26:09

unknownsoldier 
Level 57
Report
So, https://warlight001.appspot.com/ now has a head-to-head record table. I don't know if I should be happy I added it, or depressed that it took me so long :/

It seems we need to know some django webstuff also, www.djangobook.com seems a nice book/website.
Also, I had some problem with python 2.5 vs 2.7 (my code ran ok locally but not on google apps - a pain to debug like that).
The other thing that slows me down is that many code errors do not show up - you have to guess what might have gone wrong. I guess this is because I don't have full debugging on, but that is because when setting up, other things fell over when I did.

I sometimes wonder if Fizzer set this API stuff up as part of a cunning plan to make us appreciate more the hard work and skill he has put into creating warlight :)



Anyway, the next thing I thought I would try is making a swiss tournament. I want to do something simple, but that is not currently on warlight. Any advice/comments?

(Swiss is a bit like round-robin, but (much) fewer games. Everyone plays the same number of games though, and at the end, the number of points you have is a pretty good reflection of how good you are.)

And please, if people could join the current random-match tourney, and play their games fast, that would help with testing. Cheers.
New to programming?: 12/21/2012 01:39:55

Fizzer 
Level 64

Warzone Creator
Report
now has a head-to-head record table.


Nice work!

I had some problem with python 2.5 vs 2.7


Ack, that's not good. I'm not sure if this will help you, but in app.yaml you can change the word "python" to "python27" to make it run 2.7. I'm not familiar enough with Python to know if this will break anything else though. It might be a good idea to upgrade the base CLOT code too for others.

The other thing that slows me down is that many code errors do not show up - you have to guess what might have gone wrong.


I'm not sure what you mean by this. Can you elaborate?

And please, if people could join the current random-match tourney, and play their games fast, that would help with testing


If you don't find enough from this post, make a new forum thread asking for people.
New to programming?: 12/26/2012 19:41:22


ChrisCMU 
Level 61
Report
My CLOT ran fine without edits and I have 2.7. The only change I made was eliminating the tabs/comments like Lolowut did.
Posts 41 - 49 of 49   <<Prev   1  2  3