Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Off Topic Discussions > Webmasters Area

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2009, 04:35 AM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 8,187
Fireballchad
Default Stumped

lol Right now I am trying to figure out how to do something... but either my server is stupid and keeps breaking or I am way to tired... I think its both.
PHP Code:
// I cant get it to this for some reason
$newclicks $totalclicks $bonus
Its normaly + 1 but it will not accept $bonus for some reason its bugging me... I have the var set correctly from the data base it will show up in the page when i call it but it wont do the clicks :( and earlier i had two $thingone + $thingtwo = $thingthree they where working but they died also...
Reply With Quote
  #2  
Old 11-30-2009, 09:10 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,270
Arianna will become famous soon enough
Default RE: Stumped

Really? I have code which runs with this:
PHP Code:
            $newbalance $money $wordcount
From what I see in your code, it should work. Have you made sure that $bonus is being declared?
Reply With Quote
  #3  
Old 11-30-2009, 12:57 PM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 7,902
exdiogene
Default RE: Stumped

above it just put
PHP Code:
$bonus 1
Reply With Quote
  #4  
Old 11-30-2009, 01:00 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,270
Arianna will become famous soon enough
Default RE: Stumped

Or whatever the bonus is equal to. ;)
Reply With Quote
  #5  
Old 11-30-2009, 05:36 PM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 8,187
Fireballchad
Default RE: Stumped

Quote:
Originally Posted by tommyk1210
above it just put
PHP Code:
$bonus 1
I was attempting to ad a feature where you buy and item and it gives you an extra click bonus... I had $bonus become the correct number while querying it from the data base, but it broke the clicks for some reason. When someone clicks it said you did it and logs it but it does not give you the clicks it gives you 0.
Reply With Quote
  #6  
Old 12-01-2009, 12:11 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,270
Arianna will become famous soon enough
Default RE: Stumped

Make sure that you're getting $bonus correctly - a few weeks ago, I almost totally restructured a piece of code, and then I noticed that it just wasn't getting the most important variable from the database correctly.
Reply With Quote
  #7  
Old 12-01-2009, 02:03 AM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 7,902
exdiogene
Default RE: Stumped

Quote:
Originally Posted by Fireballchad
Quote:
Originally Posted by tommyk1210
above it just put
PHP Code:
$bonus 1
I was attempting to ad a feature where you buy and item and it gives you an extra click bonus... I had $bonus become the correct number while querying it from the data base, but it broke the clicks for some reason. When someone clicks it said you did it and logs it but it does not give you the clicks it gives you 0.
It would be easier to just put $bonus = 1 if that is what it always is. This puts less strain on the sevrer and increases the speed of the script if it doesnt need to query the database. Have you tried it without using the database?
Reply With Quote
  #8  
Old 12-01-2009, 09:10 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,270
Arianna will become famous soon enough
Default RE: Stumped

However, what if bonus is different? What would be the point of bonus being one? Then it would just be the same as a normal script. :/
Reply With Quote
  #9  
Old 12-01-2009, 12:08 PM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 7,902
exdiogene
Default RE: Stumped

Well in all intents and purposes the script should work as he currently has it.

@Fireballchad: May we look at the script? Maybe we can spot an error as the script should work as you described it.
Reply With Quote
  #10  
Old 12-01-2009, 02:43 PM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 8,187
Fireballchad
Default RE: Stumped

Quote:
Originally Posted by tommyk1210
Well in all intents and purposes the script should work as he currently has it.

@Fireballchad: May we look at the script? Maybe we can spot an error as the script should work as you described it.
Oh I put it back to normal because I could not get it to work properly.
I will show you what I was attempting to do.
PHP Code:
              $query "SELECT * FROM `adopts_users` WHERE `username`='$loggedinname'";
                  
$result mysql_query($query);
                  
$num mysql_numrows($result);
                  
                  
$i 0;
                  while (
$i 1) {
                      
$bonus = @mysql_result($result$i"bonus");
                      
$i++;
                  }

$newclicks $totalclicks $bonus;// Add 1 click to the current click total of this adoptable...
    

    // Actually insert our click information into the database...

    
$query "UPDATE ".$prefix."owned_adoptables SET totalclicks='$newclicks' WHERE aid='$id'";
    
mysql_query($query); 
***Edit
Hmmm I just changed it on my script to see if it could work... and it worked... I have no clue why it was not working before hand...
Reply With Quote
Reply


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
stumped. i really need help. Phoeniix Questions and Supports 21 10-29-2013 02:14 PM


All times are GMT -5. The time now is 06:50 PM.

Currently Active Users: 595 (0 members and 595 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636