Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Couple of problems

 
Post new topic   Reply to topic Printable version
 View previous topic  Some crash log Post :: Post Using Watch Damage  View next topic  
Author Message
WhiskeyTango
Newbie


Age:47
Gender:Gender:Male
Joined: Jul 02 2010
Posts: 12
Offline

PostPosted: Wed Jul 14, 2010 8:09 pm    Post subject: Couple of problems Reply to topic Reply with quote

(1)

I'm working with a module premade by BaK-..

In this section of his file I'm receiving this/these warning(s):

C:\asss-1.5.0rc2\vehicles\vehicles.c In function `loadAttrs':

268 C:\asss-1.5.0rc2\vehicles\vehicles.c [Warning] comparison is always false due to limited range of data type

Within this set of code:

void loadAttrs(Arena* arena)
{
FZData *fzd = P_ARENA_DATA(arena, fzkey);
TurretData td;
int now = current_ticks()/100;
const char* attrLocation = "Vehicle%iLocation";
const char* attrReady = "Vehicle%iReadyLvz";
const char* attrBroken = "Vehicle%iBrokenLvz";
const char* attrShip = "Vehicle%iShip";
const char* attrDisallowDriverShips = "Vehicle%iDisallowDriverShips";
const char* attrDisallowAttachShips = "Vehicle%iDisallowAttachShips";
const char* attrDisallowEnemyAttach = "Vehicle%iDisallowEnemyAttach";
const char* attrMaxTurrets = "Vehicle%iMaxTurrets";
int index = 0;
char buf[128];

td.state = STATE_READY;
td.lastDeath = now - fzd->turretDeathSecs;

for (index = 0; TRUE; ++index)
{
const char* name = 0, *ready = 0, *broken = 0, *ship = 0,
*disallowDriverShips = 0, *disallowAttachShips = 0, *disallowEnemyAttach = 0,
*maxTurrets;

snprintf(buf,sizeof(buf),attrLocation, index);
name = mapdata->GetAttr(arena, buf);

snprintf(buf,sizeof(buf),attrReady, index);
ready = mapdata->GetAttr(arena, buf);

snprintf(buf,sizeof(buf),attrBroken, index);
broken = mapdata->GetAttr(arena, buf);

snprintf(buf,sizeof(buf),attrShip, index);
ship = mapdata->GetAttr(arena, buf);

if (!name || !broken || !ready || !ship)
break;

snprintf(buf,sizeof(buf),attrDisallowDriverShips,index);
disallowDriverShips = mapdata->GetAttr(arena,buf);

snprintf(buf,sizeof(buf),attrDisallowAttachShips,index);
disallowAttachShips = mapdata->GetAttr(arena,buf);

snprintf(buf,sizeof(buf),attrDisallowEnemyAttach,index);
disallowEnemyAttach = mapdata->GetAttr(arena,buf);

snprintf(buf,sizeof(buf),attrMaxTurrets,index);
maxTurrets = mapdata->GetAttr(arena,buf);

td.disallowEnemyAttach = FALSE;
td.maxTurrets = 1;

if (disallowEnemyAttach && strtol(disallowEnemyAttach,0,0) != 0)
td.disallowEnemyAttach = TRUE;

if (maxTurrets)
td.maxTurrets = (u8)strtol(maxTurrets,0,0);

snprintf(td.disallowDriverShips, sizeof(td.disallowDriverShips),"%s",disallowDriverShips);
snprintf(td.disallowAttachShips, sizeof(td.disallowAttachShips),"%s",disallowAttachShips);

extractPoint(name,&td.start_x,&td.start_y);
td.x = td.start_x;
td.y = td.start_y;
td.readyObj = (u16)strtol(ready,0,0);
td.brokenObj = (u16)strtol(broken,0,0);
td.ship = (u8)strtol(ship,0,0) - 1;

if (td.ship < SHIP_SHARK || td.ship < SHIP_WARBIRD)
td.ship = SHIP_SHARK;

addTD(fzd->turretVector,&td);

// and move the lvz object into place
moveReadyLvz(arena, &td);

lm->Log(L_DRIVEL,"<vehicles> Attr Vehicle Added at %i, %i (ready = %i) (broken = %i)",td.x,td.y,td.readyObj,td.brokenObj);
}
}

When you click on the warning it highlights:

if (td.ship < SHIP_SHARK || td.ship < SHIP_WARBIRD)

I know it could be something before this line that I'm missing... I've been all over the forum and the internet looking to see if I could solve it myself, like I have with other errors with other modules, and I just seem to be missing something...

(2)

Also, and probably a noob question I'm sure:

I'm getting an error right before my asss crashes:

Jul 14 11:10:04 E <net> can't bind socket to 0.0.0.0:6000 for Listen0

Under [Listen] all it has is a port... Is there something I'm not adding that I need to? Its been saying the same thing every time I start up:

D <net> listening on 0.0.0.0:6000 <0>

It hasn't had that error until recently... I could have missed something.. That wouldn't surprise me any.. I just can't figure out what... I don't understand y its 0.0.0.0 unless it's supposed to be.. Since its never had an error before, I've never questioned it...

If there's anything else you need to see to help answer this let me know.. Also, I intend to change a bunch of the original module to fit what I need, but I prefer to work from something that is actually working all the way if I intend to use something someone else did.. Thanks for your help..
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Jul 14, 2010 9:51 pm    Post subject: Reply to topic Reply with quote

The warning looks harmless, but you can double check with Bak- about it. It looks to me like the code is checking for an error that can't possibly happen, and the compiler is just letting you know.

As for (2), it seems like the zone can't acquire port 6000 for some reason. The 0.0.0.0 thing is normal. It just means it's going to listen on all IP addresses that your computer has.

Perhaps there's a running copy of ASSS that hasn't been killed properly? That's the usual culprit of port acquisition failures. A restart of the computer would be on the top of my list for troubleshooting.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Jul 14, 2010 11:29 pm    Post subject: Reply to topic Reply with quote

Use [code] tags tongue.gif
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Thu Jul 15, 2010 4:40 am    Post subject: Reply to topic Reply with quote

no, that listen log message shows up every time, and it means SUCCESS
if it couldnt get the port, the log message would be 'couldnt bind to 6000' if you had one running already

edit:
nvm, i tl;dr'd
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
WhiskeyTango
Newbie


Age:47
Gender:Gender:Male
Joined: Jul 02 2010
Posts: 12
Offline

PostPosted: Thu Jul 15, 2010 3:18 pm    Post subject: Reply to topic Reply with quote

Guess that explains how come a restart seemed to have fixed it...

As for the other... If that's not causing any problems, which I'm not sure still, then y are the lvzs that module needs only loading about 60% of the time? Even sometimes when they load, I can use one of the commands, and asss just crashes... I found today that if I restart the asss core, it'll load them some times but not others... If I *recycle, which I'm sure is the wrong command I should be using, it loads them every time... Am I just not shutting my core down correctly... I use Ctrl+C...

And I guess Ill just add this here:

On my SQL server.. I can query it from my workbench program it gave me so I know it's there and up... I have a basic table loaded for testing, but the asss will still not connect... Yes I created a new asss login for it and checked it so I know the name and password work.. I've tried using localhost, 127.0.0.1, my 192 ip and my actual ip the zone is listed as... None have worked.. I'm assuming maybe I have the database name wrong somehow...

And which of the modules is best to use to get it to connect? The one that came with the asss, or is there something else? I've tried uncommenting the database:mysql and then setting up the [mysql] in global but still setting something wrong... And trust me, its not like I haven't read EVERY thread on it at least twice, but most of those are socket errors... If that's what this is its not telling me... Oh, and I did check my router and the workbench put the port stuff in there for me....
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Jul 15, 2010 4:27 pm    Post subject: Reply to topic Reply with quote

You'll have to post a log, or some kind of error message for us to help.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
WhiskeyTango
Newbie


Age:47
Gender:Gender:Male
Joined: Jul 02 2010
Posts: 12
Offline

PostPosted: Thu Jul 15, 2010 4:49 pm    Post subject: Reply to topic Reply with quote

Ok, will recreate the error, if I can, and get logs...

edit:

When I recreate the crash and go back to my log, my log is cut off.. I read somewhere in the form that it does that.. Is there a way to get the log to complete so I can see the error...

I restarted the asss, and when I logged in, the lvzs were there and it all worked without crashing... That's what I'm trying to fix... Why aren't the lvz's loading every time.. Something seems to be changing, I just can't figure out what..

SQL: all it says is:

I <mysql> connecting to mysql db on 127.0.0.1, user asss, db asss

W <mysql> connect failed: Can't connect to MySQL server on '127.0.0.1' <10061>

Changed:

W <mysql> connect failed: Can't connect to MySQL server on 'localhost' <10061>

Is there a place I can actually look up those numbers? The <10061>?
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Jul 15, 2010 6:22 pm    Post subject: Reply to topic Reply with quote

10061 seems to be a generic "cannot connect" error code for MySQL
Back to top
View users profile Send private message Add User to Ignore List
WhiskeyTango
Newbie


Age:47
Gender:Gender:Male
Joined: Jul 02 2010
Posts: 12
Offline

PostPosted: Thu Jul 15, 2010 10:18 pm    Post subject: Reply to topic Reply with quote

In my MySQL Workbench, when I open the asss connection, over in the bottom left corner it says:

Connection Information
===============

Name: asss
Host: 127.0.0.1:3309
Server: MySQL
Version: 5.1.48-community
User: asss

Just some extra info if it helps....
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 657 page(s) served in previous 5 minutes.

phpBB Created this page in 0.465038 seconds : 34 queries executed (93.1%): GZIP compression disabled