![]() |
Trying to make a marking changer for adopts.
So, I'm using a mod similar to the gender change one that Wallie made and breed change mod that kristhasirah made to try and make a marking changer and I'm running into problems.
I want to make it so that each adopt has a "hidden" color that can be brought out by the markings, so a fish that has the colors "Gold/Gold/Black" would not have the black show until the marking is added. When I only have one adopt specified, then it works well. PHP Code:
What I'm wondering is if doing an array would work the way that I want it to. If not, are there any other suggestions anyone might have that might work? I'm going to keep tinkering with this on my days off because this is one of the things that I need to fix before I set up the alpha tests on my site. Hopefully I'm making sense with my questions, too. I'm having one of those weeks where my language skills are off (and I can't blame wedding brain anymore) Thanks! |
Ah, conditional statements. You should definitely be able to have multiple outcomes! You could try beginning the next statement with 'else if', rather than making another 'if' block - which could get messy if you have a lot of markings, or... perhaps try using switch statements. Additional info: ( x, x ).
Currently: 1- Your switch statement doesn't break. It's important to break so it leaves the switch statement and continues on with the code properly. You only have one case, though? So why is the switch statement here? 2- Your last closing bracket doesn't follow up with anything, as the function ends before the return goes through. Can you double check the formatting on all that? Why not make the outer if statement if($type == "Common (Gold/Gold/Black)") a switch statement instead? Are you looking for something like this? PHP Code:
|
Oh my goodness! That is exactly it! Thank you so so so much!
If you ever need any art or anything in return, let me know! This works perfectly! ^v^ |
:happycbig: Oh cool, I'm glad! I barely have any idea what you're up to with this, but it certainly sounds fascinating.
|
All times are GMT -5. The time now is 09:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.