Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.3.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=42)
-   -   Mys v1.3.x Stat/SKill System (http://www.mysidiaadoptables.com/forum/showthread.php?t=4563)

Missy Master 06-30-2014 12:44 PM

I have to put back the good code now, though, I am opening my sites in a few days and I am crunched for time to get this all ready :)

I am really hoping HOF can possibly swing in here and help, I think this would be a really great mod !!

Hwona 06-30-2014 01:10 PM

^Okay, I still have to wrap up the v.1.3.3 tutorial and my own site. XP

IntoRain 06-30-2014 03:10 PM

The error is probably because in the file it's supposed to throw an exception if the adoptable has already been clicked. In 1.3.4 all pages are separated into two files: One manages the controller (database accesses and verifications) and the other (in the folder view) manages what is shown to the user. The exchange of variables between these files is done through a hashmap. What's happening is that, when the user has already clicked an adoptable, this should throw an exception:

elseif($this->adopt->hasVoter($mysidia->user, $date)){
$message = ($mysidia->user instanceof Member)?"already_leveled_member":"already_leveled_ guest";
throw new LevelupException($message);
}

And it stops the levelupview.php page from generating text.

If you don't throw an exception there, the view file will try to access two variables called Reward and Adopt, which are set by the controller only in the case they pass all conditions:

(from levelup.php)
else{
//stuff
$this->setField("adopt", $this->adopt);
$this->setField("reward", new Integer($reward));
}

So it's basically trying to use two variables it can't find in the hashmap:

(from levelupview.php)
$adopt = $this->getField("adopt");
$reward = $this->getField("reward")->getValue();


-----

Maybe try setting both variables at the beginning instead of being inside the else clause?

Hwona 06-30-2014 04:06 PM

^Hmmm... which code would be best to try this with?

Hwona 07-01-2014 05:58 PM

The guide is now fully updated! :D

Missy Master 07-01-2014 07:35 PM

That's wonderful!! :)

Hwona 07-01-2014 08:04 PM

I'm going to try and figure out how to do this with v.1.3.4 now... :L

Kesstryl 07-01-2014 09:18 PM

This is really great! Please do get it working with the latest version, I love what I'm seeing here!

Hwona 07-01-2014 10:29 PM

^Oh thank you! Actually, I think everything is compaticle with v.1.3.4(at least the assigning stats to new adopts part). The only part I'm stuck on is displaying information on the levelup page... :3

Hwona 07-02-2014 02:47 PM

I updated the guide! Promocode adopts can now be assigned stats!(Sorry for forgetting!) Just go to step 4 of the "assigning stats" post and update your code. :3


All times are GMT -5. The time now is 09:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.