DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • June 16, 2019, 05:33:44 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Ok I'm lost....  (Read 3823 times)
0 Members and 1 Guest are viewing this topic.
zachattack
Guest
« on: September 27, 2005, 10:51:35 PM »

 Huh This is confusing!!!???  I have this module all worked out and now I can;t get it to work. I'll enter the shop and I get an error saying it's not activated installed and not in the module directory which it is. What could be the problem.
Code:
<?php
function Movies_getmoduleinfo(){
    
$info = array(
        
"name"=>"Movies",
        
"version"=>"1.0",
        
"author"=>"  Zachary Bridges ",
        
"category"=>"Village",
        
"download"=>"",
        
"settings"=>array(
         
"Movies - Settings,title",
         
"Moviesloc"=>"Where does the hut appear,location|".getsetting("villagename",  
LOCATION_FIELDS)
        )
    );
    return 
$info;
}
function 
Movies_install(){
   
module_addhook("changesetting");
   
module_addhook("village");
    return 
true;
}

function 
Movies_uninstall(){
    return 
true;
}

function 
Movies_dohook($hookname,$args){
    global 
$session;
    switch(
$hookname){
      case 
"changesetting":
      if (
$args['setting'] == "villagename") {
         if (
$args['old'] == get_module_setting("Moviesloc")) {
            
set_module_setting("Moviesloc"$args['new']);
   }
      }
   break;
      case 
"village":
      if (
$session['user']['location'] == get_module_setting("Moviesloc")) {
            
tlschema($args['schemas']['tavernnav']);
         
addnav($args['tavernnav']);
            
tlschema();
         
addnav("v?Movies","runmodule.php?module=Movies");
   }
      break;
   }
    return 
$args;
}

function 
Movies_run() {
    global 
$session;
   
$op httpget('op');
   
page_header("Movies");
   if (
$op == "") {
   
output("`&`c`bWelcome to the  Movie Theater!`b`c");
   
output("`7You walk into the Movies. Your excited because they have a brand new deal.Choose your favorite food combo and movie FOR FREE!`n`n");
   
output("`2Which combo would you like?`n`n");
   
addnav("Buttered Popcorn and Horror movie","runmodule.php?module=Movies&op=Buttered Popcorn and Horror");
   
addnav("Caramel Popcorn and Action movie","runmodule.php?module=Movies&op=Caramel Popcorn and Action");
   }elseif (
$op == "Buttered Popcorn and Horror"){
   
output("`7You take the buttered popcorn and horror movie. Your so excited for the horror movie! You`n`n"); 
    
output("walk into the dark room. You decide to seat in front room. You begin to eat  your Buttered popcorn. The horror`n`n");  
    
output("movie begins to play. You watch the movie and right in the middle the movie shows a giant cyclops eating a human.`n`n");  
    
output("You begin to shiver and you hide under your seat shivering in fear! You look over and find a gem under your seat!`n`n");
    
$session['user']['gems']++;
   
debuglog("found a gem in under your seat");
    }elseif (
$op == "Caramel Popcorn and Action"){
    
output("You take the caramel popcorn and enter the dark movie.You begin to eat your caramel popcorn!`n`n");
    
output("The action movie begins You watch it to the end. All the that action pumps you up!`n`");
    
output("You gain a forestfight.`n`n");
    
$session['user']['turns']++; 
   
debuglog("You gained some turns");
   }
   
villagenav();
   
page_footer();
    }
   
?>
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: September 27, 2005, 11:53:48 PM »

You recognized, that your function's names are capitalized and PHP as well as Liux are case sensitive...

So if you file's name is "movies" and your function's name is "Movies" they are two different names...
« Last Edit: September 27, 2005, 11:53:57 PM by XChrisX » Logged

Running for more than three years now:
Antic
Guest
« Reply #2 on: September 27, 2005, 11:57:00 PM »

Have upload code as Movie.php and it works fine. Sounds for me you take a different filename  Smiley


EDIT:

oops ^^ Chris was faster  Grin
« Last Edit: September 27, 2005, 11:57:42 PM by Antic » Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #3 on: September 27, 2005, 11:59:05 PM »

oops ^^ Chris was faster  Grin

*wooooohooooooooooooo*

* XChrisX does a little dance...

Tongue
Logged

Running for more than three years now:
Zacharei2
Guest
« Reply #4 on: September 28, 2005, 07:22:50 PM »

Thanks for your help Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
31 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search