Wgrpg

java

#21

by being lucky with the mystery potions. I dont think there is a way to stretch it with eating more food than the maximum capacity. but if you are lucky, it can get really big… once i was beyond 10lbs


#22

This is Cryptic on a different account. I suppose you have no way of knowing if that’s true or not, so you’ll just have to trust me for now.

I unfortunately did not create an up-to-date MySQL dump of my game’s database, so the one on my github repository is the latest. I had to reinstall WAMP, and I did not create a new dump or even backup my database, so all of that database stuff is lost.

I do, however have the latest files locally, so if I did any coding work prior to the latest release of the repository, at least that is preserved.

The last thing I got working was the party system, and if you enter a floor after the beginning tutorial event, the tutorial fairy gets thrown into your party and will randomly feed enemies or allies. There’s no UI for adding/removing party members though, that was what I was gonna do next before I ran into IRL roadblocks.

If you want to release a working version of the game, feel free. Ideally I’d want it hosted somewhere too so people who don’t know how to setup a local webserver can play too. Someone else would have to do it though; I can’t be arsed to spend any of my money on hosting a hobby project which is why the game is offline in the first place.


#23

Thanks alot, I’ll try it out later.


#24

Hi, I’ve also been trying to play the game locally and am new to php and have hit a bit of a snag. Whenever I select an option that prompts an action, this error appears: Array to string conversion in C:\xampp\htdocs\game\DialogConditionFactory.php on line 183

Undefined property: RPGCharacter::$Array in C:\xampp\htdocs\game\DialogConditionFactory.php on line 183

Uncaught Error: Function name must be a string in C:\xampp\htdocs\game\DialogConditionFactory.php:183 Stack trace: #0 C:\xampp\htdocs\game\command.php(40): DialogConditionFactory::evaluateAction(‘giveItem~11’) #1 {main} thrown in C:\xampp\htdocs\game\DialogConditionFactory.php on line 183

I’m not sure how an array is passed in because the the line in question only calls upon elements from the exploded strAction.

Heres the line in question: $_SESSION[$strSession]->$function[0]($function[1], (isset($function[2]) ? $function[2] : null), (isset($function[3]) ? $function[3] : null), (isset($function[4]) ? $function[4] : null), (isset($function[5]) ? $function[5] : null));

If you have any insight into how I can fix this I would greatly appreciate it.


#25

I believe this is because I coded the game in an earlier version of php. Some things have changed in the latest version (for example, you can’t have class constructors with the same name as the class which ALL of my classes use, what a pain!) and I imagine this is a side effect of that.

Set $function1 = $function[0]; beforehand and then try $_SESSION[$strSession]->$function1( … on line 183. Something like that will likely fix it.

It seems that you’re pretty close to getting the game up and running too, so well done!


#26

Thanks so much that did the trick! I have it running mostly well with the limited database, just with a bunch cut out.


#27

Interesting. I essentially came to the same conclusion about why the issue existed (You’d think PHP would keep old syntax working for legacy sites, but w/e); however, I had a different solution. I just put brackets around the first function[0], so it became:

$_SESSION[$strSession]->{$function[0]}($function[1], (isset($function[2]) ? $function[2] : null), (isset($function[3]) ? $function[3] : null), (isset($function[4]) ? $function[4] : null), (isset($function[5]) ? $function[5] : null));

Note that I probably know just as much PHP as the other guy (though I do have experience in other languages), but that solution seemed to work as well.


#28

Can someone please ping me once there is a working solution for dummies :smiley: or at least some tutorial or such


#30

I second this. Hopefully someone gets it up and running soon