DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • January 20, 2018, 01:18:36 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: gold problem  (Read 1933 times)
0 Members and 1 Guest are viewing this topic.
Kala
Codemeister
****
Offline Offline

Posts: 479

Who Me?


View Profile WWW
« on: December 18, 2005, 09:27:27 PM »

The module I'm trying to write, involves taking gold from a user but for some reason this section of code isn't working
Code:
  }else if ($op=="" || $op=="open"){
  if ($session['user']['gold']<100000000){
  output("`^You don't seem to have enough gold.`n");
  $x=$session['user']['gold'];
  output("value=$x");
  addnav("Leave", "village.php?");
  $session['user']['specialinc'] = "";
  }else{
  $session['user']['gold']-=100000000;
  output("`6Smiling, she takes your 100 000 000 gold and adds your name to her list.`n`n");
  addnav("Continue", "runmodule.php?module=storagevault&op=continue");

I added the variable in and the output I get from that is
$x=

am only new to coding these modules, any help would be greatly appreciated.

when it runs, it takes me straight to Leave link I put in if the user doesn't have enough gold

the character I'm using has 2.1 billion gold onhand.
« Last Edit: December 18, 2005, 09:32:34 PM by Kala » Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
http://www.timerealms.net
http://www.legendofshrell.com
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: December 18, 2005, 10:49:21 PM »

maybe you just forgot a "global $session;" somewhere in your code Smiley
Logged

Running for more than three years now:
Kala
Codemeister
****
Offline Offline

Posts: 479

Who Me?


View Profile WWW
« Reply #2 on: December 18, 2005, 11:02:56 PM »

heh yup I did

thought it'd be something simple

*blush*

Thanks Chris all fixed now Cheesy
Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
http://www.timerealms.net
http://www.legendofshrell.com
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
16 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search