Welcome to the Builder Academy

Question problems running tbamud on the raspberry pi

More
25 Aug 2020 19:59 #8986 by nickg
I am trying to run tbamud on the raspberry pi model 3b computer for testing purposes. The code builds just fine but when I run it I get these errors. I have both tried running as the pi user and as root with the same result. If I run on Debian on a x64 based laptop the server runs just fine and I am able to connect. I have posted all messages here so you can see what is happening. I am using the full raspberry pi operating system image fully updated on stable. I even deleted everything and redownloaded everything again from git to see if it would fix the issue and it did not.
No etc/config file, using defaults: No such file or directory                                                          
Using file descriptor for logging.                                                                                     
Aug 24 19:15:12 2020 :: Loading configuration.                                                                         
Aug 24 19:15:12 2020 :: tbaMUD 2020                                                                                    
Aug 24 19:15:12 2020 :: Using lib as data directory.                                                                   
Aug 24 19:15:12 2020 :: Running game on port 4000.                                                                     
Aug 24 19:15:12 2020 :: Finding player limit.                                                                          
Aug 24 19:15:12 2020 ::    Setting player limit to 300 using rlimit.                                                   
Aug 24 19:15:12 2020 :: Opening mother connection.                                                                     
Aug 24 19:15:12 2020 :: Binding to all IP interfaces on this host.                                                     
Aug 24 19:15:12 2020 :: Boot db -- BEGIN.                                                                              
Aug 24 19:15:12 2020 :: Resetting the game time:                                                                       
Aug 24 19:15:12 2020 :: No time file 'etc/time' starting from the beginning.                                           
Aug 24 19:15:12 2020 ::    Current Gametime: 7H 9D 2M 885Y.                                                            
Aug 24 19:15:12 2020 :: Initialize Global Lists                                                                        
Aug 24 19:15:12 2020 :: Initializing Events                                                                            
Aug 24 19:15:12 2020 :: Reading news, credits, help, ihelp, bground, info & motds.                                     
Aug 24 19:15:12 2020 :: Loading spell definitions.                                                                     
Aug 24 19:15:12 2020 :: Loading zone table.                                                                            
Aug 24 19:15:12 2020 ::    189 zones, 10584 bytes.                                                                     
Aug 24 19:15:12 2020 :: Loading triggers and generating index.                                                         
Aug 24 19:15:12 2020 :: Loading rooms.                                                                                 
Aug 24 19:15:12 2020 ::    12732 rooms, 1324128 bytes.                                                                 
Aug 24 19:15:12 2020 :: Renumbering rooms.                                                                             
Aug 24 19:15:12 2020 :: Checking start rooms.                                                                          
Aug 24 19:15:12 2020 :: Loading mobs and generating index.                                                             
Aug 24 19:15:12 2020 ::    3705 mobs, 74100 bytes in index, 1348620 bytes in prototypes.                               
Aug 24 19:15:12 2020 :: SYSERR: Format error after string section of mob #111                                          
 ...expecting line of form '# # # {S | E}'                                                                              

Please Log in or Create an account to join the conversation.

More
26 Aug 2020 10:08 #9008 by Opie
Can you share what mob #111 looks like in 1.mob file inside lib/world/mob?

Or you can compare it with the file here: github.com/tbamud/tbamud/blob/master/lib/world/mob/1.mob

(Unless this isn't a stock tbaMUD.)

Usually I use dos2unix command to fix world files on some machines, that tends to do the trick. Though this error might not be related.

Please Log in or Create an account to join the conversation.

More
26 Aug 2020 18:27 #9025 by nickg
I redownloaded that 1.mob file and still get this same error message. If I use the -m option for mini mode the same error comes back for mob 3002. I even redownloaded it to so to see if something was broken during the original git clone. Here is the error message when in mini mode.
Aug 26 13:11:25 2020 :: SYSERR: Format error after string section of mob #3002
...expecting line of form '# # # {S | E}'
It is the stock tbamud code as I don't want to change anything until I know that it works just fine. When running this same version on the x64 based linux laptop it runs just fine. Here is mob 111
#111
rowin jeweler~
the jeweler~
Rowin, the jeweler, stands behind his display case.
~
The jeweler has an eyepiece shoved in one squinted eye, and looks as if he
may be a tough bargainer. You won't have much luck swindling this swindler.

~
190474 0 0 0 16 0 0 0 1000 E
33 9 -9 6d6+330 5d5+5
330 108900
8 8 1
E
T 122
Here is mob 3002
#3002
grocer~
the grocer~
A grocer stands at the counter, with a slightly impatient look on his face.
~
A tall grocer, who moves two 200 pounds bag of flour around on his shoulders.

~
26635 0 0 0 16 0 0 0 900 E
33 9 -9 6d6+330 5d5+5
330 108900
8 8 1
E
Hopefully the formatting worked ok in the forums as I used notepad to copy the mob text out.

Please Log in or Create an account to join the conversation.

More
26 Aug 2020 21:43 #9036 by thomas
Ok, I'm not entirely sure here, so I suggest a bit of debugging. This is a small debug-app, that simply opens the supplied data.txt file and attempts to do the same as db.c does when reading the file:
Code:
#include <stdio.h> #include <stdlib.h> #include <string.h> int get_line(FILE *fl, char *buf); int main(void){ int t[10], retval; char line[256], letter; char f1[128], f2[128], f3[128], f4[128], f5[128], f6[128], f7[128], f8[128]; FILE *mob_f = fopen("data.txt", "r"); if (!get_line(mob_f, line)) { printf("couldn't read a line\r\n"); exit(1); } fclose(mob_f); retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter); printf("Got %d results\r\n", retval); printf("f1-8: %s %s %s %s %s %s %s %s \r\n", f1, f2, f3, f4, f5, f6, f7, f8); printf("t+2: %d\r\n", *(t+2)); printf("letter: %c\r\n", letter); } int get_line(FILE *fl, char *buf) { char temp[256]; int lines = 0; int sl; do { if (!fgets(temp, 256, fl)) return (0); lines++; } while (*temp == '*' || *temp == '\n' || *temp == '\r'); /* Last line of file doesn't always have a \n, but it should. */ sl = strlen(temp); while (sl > 0 && (temp[sl - 1] == '\n' || temp[sl - 1] == '\r')) temp[--sl] = '\0'; strcpy(buf, temp); /* strcpy: OK, if buf >= READ_SIZE (256) */ return (lines); }

The data.txt:
Code:
190474 0 0 0 16 0 0 0 1000 E -

Output on linux is:

$ gcc test.c
$ ./a.out
Got 10 results
f1-8: 190474 0 0 0 16 0 0 0
t+2: 1000
letter: E


What output do you get on the raspberry?

Please Log in or Create an account to join the conversation.

More
27 Aug 2020 00:19 #9041 by nickg
When I try to compile this program I selected everything before the ending - I got this error message.
gcc debug.c
d
d
debug.c:50:1:
error:
unknown type name ’
The

The
data.txt:
^~~
d
d
debug.c:50:9:
error:
expected ’
=
’, ’
,
’, ’
;
’, ’
asm
’ or ’
__attribute__
’ before ’
.
’ token
The data
.
txt:
^

Please Log in or Create an account to join the conversation.

More
27 Aug 2020 19:28 - 27 Aug 2020 19:30 #9077 by thomas
Please put any console output in [ code ][ /code ] tags.

That looks like pebkac. The contents of the first code block goes into test.c, the contents of the next into data.txt. Try again.
Last edit: 27 Aug 2020 19:30 by thomas.

Please Log in or Create an account to join the conversation.

Time to create page: 0.782 seconds