Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOL_functions not working #23

Open
FranckKnight opened this issue Nov 11, 2020 · 3 comments
Open

VOL_functions not working #23

FranckKnight opened this issue Nov 11, 2020 · 3 comments

Comments

@FranckKnight
Copy link

FranckKnight commented Nov 11, 2020

I'm not sure how the code is built, but after getting SQL to work (finally), I ran every CORE file as per the instructions, only to get this.

*look*ing at a room nets this : 
#-1 FUNCTION (VOL_CHOOSEGAME) NOT FOUNDvol_header(Master Room(#2),,1,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
This is the master room. Any exit in here is considered global. The same is true for objects with $-commands placed here.
vol_separator(Players,,,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
#-1 INVALID ANSI DEFINITION: vol_color(#3,COLUMN_NAMES) Name               
vol_mxpmenu(vol_get
moniker(vol_sortnam
e(lvplayers(#2))),l
ook #-1 NO SUCH    
OBJECT VISIBLE)    
vol_separator(Things,,,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
#-1 INVALID ANSI DEFINITION: vol_color(#3,COLUMN_NAMES) Name                                     Owner                        DBref   
vol_pueblize(moniker(vol_sortname(lvthin vol_pueblize(name(owner(vol_ can't   
gs(#2))),look #-1 NO SUCH OBJECT         sortname(lvthings(#2)))),+fi         
VISIBLE)                                 nger #-1 NO SUCH OBJECT              
                                         VISIBLE)                             
vol_subheader(,,,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))

and using +help on any subject :

================<* +help: #-1 SEPARATOR MUST BE ONE CHARACTER *>================
#-1 SEPARATOR MUST BE ONE CHARACTER
==================================< Subfiles >==================================
	To read subfiles, use '+help #-1 SEPARATOR MUST BE ONE CHARACTER/<file>'
#-1 SEPARATOR MUST BE ONE CHARACTER  
--------------------------------------------------------------------------------
-=<HELP>=- SQL ERROR - UPDATE`READ: #-1 SQL ERROR: Incorrect integer value: '' for column `mush`.`vol_help_read`.`character_id` at row 1

I got the feeling the SQL error might be related to the other errors though, but not sure.

@FranckKnight
Copy link
Author

To add to this story, I was on Pennmush 1.8.8.

I tried doing the same steps on 1.8.6 and everything works (except that CCP was HALT for some reason, once cleared it worked as expected).

Seems its something in the later version of Pennmush.

@FranckKnight
Copy link
Author

...And now it started to work on PennMush 1.8.8 again. I don't know what's going on anymore.

I had to add install the ISO 8859 though, and set the LOCALE on the server apparently, but otherwise seems functional now.

Except it's giving errors with the SQL on Vol_help_read, which is minor if everything else works.

@FranckKnight
Copy link
Author

FranckKnight commented Nov 11, 2020

Gonna add this here in case someone still pays attention to this project :P

When checking any +help file on #1 :

-=<HELP>=- SQL ERROR - UPDATE`READ: #-1 SQL ERROR: Incorrect integer value: '' for column `mush`.`vol_help_read`.`character_id` at row 1

When doing the same from my Wizard account :

-=<HELP>=- SQL ERROR - UPDATE`READ: #-1 SQL ERROR: Cannot add or update a child row: a foreign key constraint fails (`mush`.`vol_help_read`, CONSTRAINT `vol_help_read_ibfk_2` FOREIGN KEY (`character_id`) REFERENCES `vol_character` (`character_id`) ON DELETE CASCADE ON UPDATE CASCADE)

When running from #1 I've pinpointed the error to this area :

#9!                                     isint(setr(set,v(setr(num,add(%q<num>,1))))) :
#9!                                      setr(set,v(setr(num,add(%q<num>,1)))) :
#9!                                       v(setr(num,add(%q<num>,1))) :
#9!                                        setr(num,add(%q<num>,1)) :
#9!                                         add(%q<num>,1) :
#9!                                          %q<num> => 1
#9!                                         add(%q<num>,1) => 2
#9!                                        setr(num,add(%q<num>,1)) => 2
#9!                                       v(setr(num,add(%q<num>,1))) => 3
#9!                                      setr(set,v(setr(num,add(%q<num>,1)))) => 3
#9!                                     isint(setr(set,v(setr(num,add(%q<num>,1))))) => 1
#9!                                     %q<set> => 3

#9!                              u(setr,sqlformat,u(SQL`FORMAT,%0,%1,%2,%3,%4,%5,%6,%7,%8,%9)) => INSERT INTO vol_help_read(character_id,help_file_id,help_read_date_checked) VALUES ('',3,UTC_TIMESTAMP()) ON DUPLICATE KEY UPDATE help_read_date_checked=UTC_TIMESTAMP()
#9!                             sql(u(setr,sqlformat,u(SQL`FORMAT,%0,%1,%2,%3,%4,%5,%6,%7,%8,%9))) => #-1 SQL ERROR: Incorrect integer value: '' for column `mush`.`vol_help_read`.`character_id` at row 1

Meanwhile on #3 :

#9!                                     isint(setr(set,v(setr(num,add(%q<num>,1))))) :
#9!                                      setr(set,v(setr(num,add(%q<num>,1)))) :
#9!                                       v(setr(num,add(%q<num>,1))) :
#9!                                        setr(num,add(%q<num>,1)) :
#9!                                         add(%q<num>,1) :
#9!                                          %q<num> => 1
#9!                                         add(%q<num>,1) => 2
#9!                                        setr(num,add(%q<num>,1)) => 2
#9!                                       v(setr(num,add(%q<num>,1))) => 3
#9!                                      setr(set,v(setr(num,add(%q<num>,1)))) => 3
#9!                                     isint(setr(set,v(setr(num,add(%q<num>,1))))) => 1
#9!                                     %q<set> => 3

#9!                              u(setr,sqlformat,u(SQL`FORMAT,%0,%1,%2,%3,%4,%5,%6,%7,%8,%9)) => INSERT INTO vol_help_read(character_id,help_file_id,help_read_date_checked) VALUES (3,3,UTC_TIMESTAMP()) ON DUPLICATE KEY UPDATE help_read_date_checked=UTC_TIMESTAMP()
#9!                             sql(u(setr,sqlformat,u(SQL`FORMAT,%0,%1,%2,%3,%4,%5,%6,%7,%8,%9))) => #-1 SQL ERROR: Cannot add or update a child row: a foreign key constraint fails (`mush`.`vol_help_read`, CONSTRAINT `vol_help_read_ibfk_2` FOREIGN KEY (`character_id`) REFERENCES `vol_character` (`character_id`) ON DELETE CASCADE ON UPDATE CASCADE)

It's a minor issue that doesn't really break the functionality, just doesn't update when you have read the help files. But still, if we can iron that out, it'd be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant