|
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Snidjer Newbie
Age:40 Gender: Joined: Jun 22 2003 Posts: 19 Location: Netherlands Offline
|
Posted: Mon Jun 23, 2003 6:05 am Post subject: Config files |
|
|
|
|
There should be some kind of parser for the config files, newbies (which most people running servers are) will be confused when their program segfaults due to incorrect configuration syntax. Instead, a syntax error should be thrown.
Death greens do not work. Mr. Twit and I have created code that gives a random green to a user as long as the green is allowed in that arena/zone. Unfortunately, it doesn't handle the specific random weights of the greens yet, but at least it works.
I've experienced random segfaults, though I've not been able to trace where they're from.
Kind regards,
Devon H. O'Dell
sitetronics.com |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Mon Jun 23, 2003 1:10 pm Post subject: |
|
|
|
|
For the Death Green, ASSS just sets it to random, which means the client can pick whatever green it wants for it (found in game.c, function PDie). So thats the client's fault there. It also correctly loads the Prize:DeathPrizeTime setting, so check to make sure you have that value set to something reasonable.
For the configs, that can be worked around with later.
For your random segfaults you cannot find: type out the errors your getting (it will log/show somewhere), which OS you using, and if you compiled it, which compiler you used. |
|
Back to top |
|
|
Snidjer Newbie
Age:40 Gender: Joined: Jun 22 2003 Posts: 19 Location: Netherlands Offline
|
Posted: Mon Jun 23, 2003 5:22 pm Post subject: |
|
|
|
|
Hm. Well, because the client isn't required to do it, and because it can cause cheating, here's the code we've made to do it: (btw, in PDie, the kp.green had a big /* FIXME */ next to it
local int RandomizeGreen(Player *);
...
kp.green = RandomizeGreen(p);
...
local int RandomizeGreen(Player *p) {
int green;
char *EnumToStr[] = {
"QuickCharge", "Energy",
"Rotation", "Stealth",
"Cloak", "XRadar",
"Warp", "Gun",
"Bomb", "BouncingBullets",
"Thruster", "TopSpeed",
"Recharge", "Glue",
"MultiFire", "Proximity",
"AllWeapons", "Shields",
"Shrapnel", "AntiWarp",
"Repel", "Burst",
"Decoy", "Thor",
"MultiPrize", "Brick",
"Rocket", "Portal"
};
while(1) {
green = (int)(1 + random()%(PRIZE_PORTAL + 1));
if (cfg == '\0') return 10;
if (p == '\0') return 11;
lm->Log(L_INFO, "Green is %d and string is %s.", green, EnumToStr[green]);
/*Check prizeweight*/
if (cfg->GetInt(p->arena->cfg, "PrizeWeight",
EnumToStr[green], 0) > 0) {
break;
}
}
return green;
}
|
I don't quite understand why you guys are so anal about code modifications when you've GPLed the code
Although I'd like to point out that I *am* a programmer, so if you guys do need help lemme know. Otherwise I might start my own fork, lol
Kind regards,
Devon H. O'Dell
sitetronics.com |
|
Back to top |
|
|
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Tue Jun 24, 2003 12:54 am Post subject: |
|
|
|
|
Right, MGB is wrong: the client doesn't do anything with the zero, unfortunately. But the point is moot: I fixed it already, and it's in cvs.
About the parser, it's not supposed to crash I know it does, but I've never taken the time to figure out where. If you send me a file that it crashes on, I'll try to find the bug(s). |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Tue Jun 24, 2003 1:06 am Post subject: |
|
|
|
|
Please note i did all my learning of how subspace works with the VIE client, so its still the client's fault. Posting bug into BugTraq. |
|
Back to top |
|
|
Snidjer Newbie
Age:40 Gender: Joined: Jun 22 2003 Posts: 19 Location: Netherlands Offline
|
Posted: Tue Jun 24, 2003 2:01 am Post subject: |
|
|
|
|
Ah, even better, I'll just write a quick parser for ya .
Kind regards,
Devon H. O'Dell |
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Software by php BB © php BB Group Server Load: 880 page(s) served in previous 5 minutes.
|