Final Fantasy Republic Forums  
 Home | Forums | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
     
 
Go Back  
 
 
 
 
  
        
     
 
Final Fantasy Republic Forums  
Username:

Password:
CAPTCHA:
  
        
Closed Thread
 
LinkBack Thread Tools Display Modes
  Arielle
 
 
Arielle's Avatar
Wandering...
 
Posts: 2,616
 
Reg: Apr 04 2002
 
ID: 448
 
RP: 0
 
World of Warcraft
Silversun Pickups
Children of Men
The Consumer Society: Myths and Structures
PC, Nintendo DS
     
 
Default  Item Shop, Item Shop.. why art thou such a pain?
06.09.02, 08:07:53
  Post #1 (permalink)
 
     

OK, afterlab's ItemShop 3.0 has been giving me nothing but trouble when I try and add things to it. I recently added several new item types to it (Materia and such), I coded what it should do for buying/selling/displaying etc. Changed the template files.

But when I try and buy one of my new items it comes up with this.

Database error in vBulletin 2.2.5:

Invalid SQL: UPDATE userfield SET ='Holy Matter' WHERE userid=1
mysql error: You have an error in your SQL syntax near '='Holy Matter' WHERE userid=1' at line 1

mysql error number: 1064

Date: Sunday 09th of June 2002 07:50:28 AM
Script: http://www.zcentralhq.com/forums/for...=Holy%20Matter
Referer: http://forums.zcentralhq.com/forums/itemshop.php?s=


I've trashed high and low over the itemshop.php file but I can't find the problem.

Quote:
<?php
error_reporting(7);
$templatesused = 'itemshop';

require('./global.php');

$pointfield="field8";
$weaponsfield="field9";
$armorfield="field10";
$itemfield="field11";
$materiafield="field12";
$eidolonfield="field13";
$revivalfield="field14";
$armfield="field16";

$pointss=$DB_site->query_first("SELECT $pointfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$points = (int) $pointss[$pointfield];
$itemm=$DB_site->query_first("SELECT $weaponsfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay = $itemm[$weaponsfield];
if(!$itemdisplay) {
$itemdisplay="No Item";
}

$itemm=$DB_site->query_first("SELECT $armorfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay2 = $itemm[$armorfield];
if(!$itemdisplay2) {
$itemdisplay2="No Item";
}

$itemm=$DB_site->query_first("SELECT $itemfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay3 = $itemm[$itemfield];
if(!$itemdisplay3) {
$itemdisplay3="No Item";
}

$itemm=$DB_site->query_first("SELECT $materiafield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay2 = $itemm[$materiafield];
if(!$itemdisplay4) {
$itemdisplay4="No Item";
}

$itemm=$DB_site->query_first("SELECT $eidolonfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay2 = $itemm[$eidolonfield];
if(!$itemdisplay5) {
$itemdisplay5="No Item";
}

$itemm=$DB_site->query_first("SELECT $revivalfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay2 = $itemm[$revivalfield];
if(!$itemdisplay6) {
$itemdisplay6="No Item";
}

$itemm=$DB_site->query_first("SELECT $armfield FROM userfield WHERE userid=$bbuserinfo[userid]");
$itemdisplay2 = $itemm[$armfield];
if(!$itemdisplay7) {
$itemdisplay7="No Item";
}

// Define weapons and points
$weapons = array("Air Racket" => "100",
"Blood Axe" => "140",
"Blood Sword" => "170",
"Brotherhood" => "510",
"Chaos Blade" => "660",
"Chaos Bow" => "330",
"Mythrill Sword" => "210",
"Ice Blade" => "400",
"Sidewinder" => "740",
"Ice Staff" => "1060",
"Trident" => "1472",
"Mythrill Rod" => "2000",
"Gold Blade" => "2459",
"Angel Sword" => "5530",
"Angel Staff" => "5530",
"Heavens Edge" => "9730");
//check weapons

foreach($weapons as $key => $value) {
if($itemdisplay==$key) {
$nxpts = $value;
}
}

// Define armor and points
$armor = array("Earth Armor" => "500",
"Magic Armor" => "830",
"Panacea Armor" => "1045",
"Fire Tunic" => "1200",
"Demon Mail" => "1450",
"Rainbow Robe" => "2000",
"Angel Armor" => "5530");
//check armor

foreach($armor as $key => $value) {
if($itemdisplay2==$key) {
$nxpts2 = $value;
}
}

// Define arm gear and points
$armgear = array("Boxing Glove" => "500",
"Iron Armlet" => "730",
"Mythrill Armlet" => "920",
"Water Bracelet" => "1490",
"Gaia Gloves" => "2763",
"Demon Wrist" => "3650",
"Angel Bracelet" => "3850",
"Holy Gloves" => "4900",
"Holy Armlet" => "5950");
//check arm gear

foreach($armgear as $key => $value) {
if($itemdisplay7==$key) {
$nxpts7 = $value;
}
}

// Define materia and points
$materia = array("Cure" => "500",
"Fire" => "500",
"Thunder" => "500",
"Ice" => "500",
"Quake" => "500",
"Flare" => "750",
"Comet" => "850",
"Time" => "900",
"Aqua" => "950",
"Enemy Skill" => "1200");
//check materia

foreach($materia as $key => $value) {
if($itemdisplay4==$key) {
$nxpts4 = $value;
}
}

// Define eidolon and points
$eidolon = array("GemStone" => "1111",
"Blood Matter" => "1200",
"Blue Matter" => "1400",
"Aqua Matter" => "1600",
"Dark Matter" => "1700",
"Terra Matter" => "2059",
"Demon Matter" => "3050",
"Holy Matter" => "5000");
//check eidolon

foreach($eidolon as $key => $value) {
if($itemdisplay5==$key) {
$nxpts5 = $value;
}
}

// Define items and points
$items = array("Antidote" => "50",
"Hi Potion" => "130",
"Tent" => "220",
"Mega Potion" => "490",
"Aura Stone" => "750",
"Mega Elixir" => "1200",
"Holy War" => "7890");
//check items

foreach($items as $key => $value) {
if($itemdisplay3==$key) {
$nxpts3 = $value;
}
}

// Define restorative and points
$ritems = array("Phoenix Down" => "500",
"Mog Esscence" => "5650");
//check restorative

foreach($ritems as $key => $value) {
if($itemdisplay6==$key) {
$nxpts6 = $value;
}
}


(the loop's etc go here)
^I can't see what's wrong in that, so can someone PLEASE Help me? Thanx!
______________________________________

Arielle
Aerith_Freak | aerithfreak | Ethereal
Former Site Manager and Forum Administrator of Final Fantasy Republic 2002-2005
Send a message via MSN to Arielle   Arielle is offline
View Arielles Profile! Find more posts by Arielle!  
  Crater Seraph
 
 
Crater Seraph's Avatar
slapstickhumor
 
Posts: 2,780
 
Reg: Mar 26 2002
 
ID: 363
 
RP: 100000
 
Final Fantasy VIII
djFirespade
Waiting
N/A
PlayStation
     
 
Default  06.09.02, 08:43:46
  Post #2 (permalink)
 
     

&nbsp;&nbsp;&nbsp;&nbsp;It may be your profile fields. Make sure that the field list is just right. If you need any further help just pm me and I'll come over to fix it.
______________________________________

Send a message via AIM to Crater Seraph   Crater Seraph is offline
View Crater Seraphs Profile! Find more posts by Crater Seraph! Visit Crater Seraphs Homepage!  
  element
 
 
element's Avatar
Uber Mem.ber
 
Posts: 2,164
 
Reg: Jan 20 2002
 
ID: 44
 
RP: 0
 
Unreal Tournament 2003
ATB
Gone in 60 Seconds
Lord of the Rings
PC
     
 
Default  06.09.02, 09:56:02
  Post #3 (permalink)
 
     

::sighs::

This is a known hack to screw up, don't use it, instead use Mewtwo's Itemshop v5.3, which can be found on vb.org. It works flawlessly.
______________________________________


Position: Economics Officer | Clan: Kilika 9 | FFR Graphics Club: Leader
Send a message via AIM to element   element is offline
View elements Profile! Find more posts by element! Visit elements Homepage!  
  Crater Seraph
 
 
Crater Seraph's Avatar
slapstickhumor
 
Posts: 2,780
 
Reg: Mar 26 2002
 
ID: 363
 
RP: 100000
 
Final Fantasy VIII
djFirespade
Waiting
N/A
PlayStation
     
 
Default  06.09.02, 10:02:04
  Post #4 (permalink)
 
     

&nbsp;&nbsp;&nbsp;&nbsp;Nope. That's sorta flawed too. Lol. I took care of this and am writing a new version of afterlab's.
Send a message via AIM to Crater Seraph   Crater Seraph is offline
View Crater Seraphs Profile! Find more posts by Crater Seraph! Visit Crater Seraphs Homepage!  
  rake
 
 
rake's Avatar
Sorceror|Supreme
 
Posts: 1,269
 
Reg: Jan 15 2002
 
ID: 4
 
RP: 0
 
None
None
None
None
     
 
Default  06.09.02, 12:23:31
  Post #5 (permalink)
 
     

well, there is no field

UPDATE userfield SET ='Holy Matter' WHERE userid=1

should be

UPDATE userfield SET fieldx='Holy Matter' WHERE userid=1

check the buy function.


Quote:
Originally posted by Anthony
&nbsp;&nbsp;&nbsp;&nbsp;Nope. That's sorta flawed too. Lol. I took care of this and am writing a new version of afterlab's.
most errors come from people who don't follow the instructions correctly.
Giving support takes time and can get very annoying. You'll see what i mean when you release it.

I thought i had taken care of every error too, and it works perfectly for me, no errors, no problems, but people keep popping up with different things, some of which are caused by incorrect installation and/or other hacks.
______________________________________



Last edited by rake : 06.09.02 at 12:27:32.
Send a message via ICQ to rake Send a message via AIM to rake   rake is offline
View rakes Profile! Find more posts by rake! Visit rakes Homepage!  
  Crater Seraph
 
 
Crater Seraph's Avatar
slapstickhumor
 
Posts: 2,780
 
Reg: Mar 26 2002
 
ID: 363
 
RP: 100000
 
Final Fantasy VIII
djFirespade
Waiting
N/A
PlayStation
     
 
Default  06.09.02, 12:36:07
  Post #6 (permalink)
 
     

&nbsp;&nbsp;&nbsp;&nbsp;Here comes Mew to save the day. Lol.
Send a message via AIM to Crater Seraph   Crater Seraph is offline
View Crater Seraphs Profile! Find more posts by Crater Seraph! Visit Crater Seraphs Homepage!  
  afterlab
 
 
afterlab's Avatar
Founder of FFR
 
Posts: 3,376
 
Reg: Jul 17 2001
 
ID: 1
 
RP: 150
 
Final Fantasy XI
Jamestown Story
50 First Dates
Alternative Press
XBox 360
     
 
Default  06.09.02, 12:36:56
  Post #7 (permalink)
 
     

Very true, Mewtwo. I've also stated only 100 so times that I no longer support this hack, and no longer allow use of it.

My Item Shop 3.0 worked but I simply took it down because I didn't want anyone else to use it (As I do with most hacks I make).
______________________________________



From the founder of Final Fantasy Republic
Gamertag Nation

  afterlab is offline
View afterlabs Profile! Find more posts by afterlab! Visit afterlabs Homepage!  
  Crater Seraph
 
 
Crater Seraph's Avatar
slapstickhumor
 
Posts: 2,780
 
Reg: Mar 26 2002
 
ID: 363
 
RP: 100000
 
Final Fantasy VIII
djFirespade
Waiting
N/A
PlayStation
     
 
Default  06.09.02, 12:39:55
  Post #8 (permalink)
 
     

&nbsp;&nbsp;&nbsp;&nbsp;No doubt, I totally agree. I will provide support for the new itemshop but it will only last for so long. Like afterlab, I will only support it as long as I use it.
Send a message via AIM to Crater Seraph   Crater Seraph is offline
View Crater Seraphs Profile! Find more posts by Crater Seraph! Visit Crater Seraphs Homepage!  
  element
 
 
element's Avatar
Uber Mem.ber
 
Posts: 2,164
 
Reg: Jan 20 2002
 
ID: 44
 
RP: 0
 
Unreal Tournament 2003
ATB
Gone in 60 Seconds