Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-17-2012, 06:00 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 89,331
AlexC is an unknown quantity at this point
Default changecash() not working

A mod I'm using, which includes a change in cash, is reporting an error;

Fatal error: Call to undefined function changecash() in /home/u973139355/public_html/slotmachine.php on line 51

The line in question is:

Code:
changecash($reward, $GLOBALS['username'], $GLOBALS['money']);
The full page;

Code:
<?php

include("functions/functions.php");

//***************//
//  START SCRIPT //
//***************//


if($isloggedin == "yes"){
// If we are logged in, we check if a user with our username voted for this adoptable today...


	

 // Adoptable is not frozen, end isfrozen else check
$act = $_GET['act'];
if($act == 'confirm'){
    $slot1 = rand(1,6);
    $slot2 = rand(1,6);
    $slot3 = rand(1,6);
    $slot4 = rand(1,6);
    $slot5 = rand(1,6);
    $slot6 = rand(1,6);
    
    if($slot1 == 1 && $slot2 == 1 && $slot3 == 1 && $slot4 == 1 && $slot5 == 1 && $slot6 == 1){
    $reward = 10;
    }elseif($slot1 == 2 && $slot2 == 2 && $slot3 == 2 && $slot4 == 1 && $slot5 == 1 && $slot6 == 1){
    $reward = 20;
    }elseif($slot1 == 3 && $slot2 == 3 && $slot3 == 3 && $slot4 == 1 && $slot5 == 1 && $slot6 == 1){
    $reward = 30;
    }elseif($slot1 == 4 && $slot2 == 4 && $slot3 == 4 && $slot4 == 4 && $slot5 == 4 && $slot6 == 4){
    $reward = 40;
    }elseif($slot1 == 5 && $slot2 == 5 && $slot3 == 5 && $slot4 == 5 && $slot5 == 5 && $slot6 == 5){
    $reward = 50;
    }elseif($slot1 == 6 && $slot2 == 6 && $slot3 == 6 && $slot4 == 6 && $slot5 == 6 && $slot6 == 6){
    $reward = 60;
    }elseif($slot1 == 1 && $slot2 == 2 && $slot3 == 3 && $slot4 == 4 && $slot5 == 5 && $slot6 == 6){
    $reward = 100;
    }else{
    $reward = 0;
    }
    
    
    if($reward > 1){
    $rewardmessage = "Congratulations, you have gained ".$reward." ". grabanysetting('cost') ."!";
    }else{
    $rewardmessage = "Sorry, you didnt win a prize this time, try again later.";
    }

    changecash($reward, $GLOBALS['username'], $GLOBALS['money']);
	$article_content = $article_content . "<div align='center'><br /><img src='".$slot1.".png'><img src='".$slot2.".png'><img src='".$slot3.".png'><br />".$rewardmessage."<br />You now have {$GLOBALS['money']} ".grabanysetting('cost')."</div>";
    
}
	

		else{

		$article_title = "Slot Machine!";
		$article_content = "Welcome at the slot machine!, here you can win various prizes!<br /><br /><a href='slotmachine.php?act=confirm'>Use the slot machine!</a>";


		}




}

else{
$article_title = "Sorry!";
$article_content = "Sorry, as a guest you cant use the slotmachine!, please register or log in.";
}


 // End the ID is not blank and is numeric else check


//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
This is a modified version of the script I found on here - it was for 1.2.x but I managed to get it working for 1.3.x before. Then somehow it got all messed up and now I'm not sure how to make it work again.
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New PM not working SapphirePhoenix Questions and Supports 6 11-25-2015 10:20 PM
Nothing seems to be working? Starrunner Questions and Supports 12 09-22-2013 05:36 PM
Email Not Working blueskyler Questions and Supports 0 12-19-2011 02:34 PM
Conditions not working SilverDragonTears Questions and Supports 7 10-28-2011 06:18 PM
Ad HTML not working AlkseeyaKC Questions and Supports 2 07-01-2011 07:13 AM


All times are GMT -5. The time now is 08:57 PM.

Currently Active Users: 2230 (0 members and 2230 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636