• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Ho-oh 112's mySQL Trade System

Still not working
Cant open PokémonSummary after uploading getting undefined method error.
Cant search for Pokémon list is always empty.
When i chose my pokémon for uploading and then press esc (no searching) the game crashes coz a undefined method error.

I have mysql and php file uploaded
 
I get this error when trying to summary the pokemon that I uploaded


---------------------------
Pokemon Dark Space
---------------------------
Exception: RuntimeError

Message: Script error within event 15, map 43 (Pokemon Center):

Exception: NoMethodError

Message: Section143:197:in `pbGTSSummary'undefined method `[]' for nil:NilClass

***Full script:

pbStartGTS()


Interpreter:243:in `pbExecuteScript'

Trade:189:in `pbPokemonGate'

Trade:54:in `pbStartGTS'

Trade:36:in `loop'

Trade:58:in `pbStartGTS'

(eval):1:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'



Interpreter:276:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'



This exception was logged in

C:\Users\Salvador1\Saved Games/Pokemon Dark Space/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
Aceptar
---------------------------

And when I try to find the pokemon for trade it doesn't appear on the list

This is how I have setup the scripts:
Host = "pokemondasp.99k.org" # mysql server(local : 127.0.0.1)
User = "698247_salva123" # mysql user
Pass = "******" # mysql password
Base = "pokemondasp_99k_interpoke" # base name
Port = 21 # server port (default: 3306)
Err_Con = "Mysql:\nUnable to connect to the database"
Err_Req = "Mysql:\nUnable to send the query"

I have my Sql and php file on zymic.com
 
The issues are likely to do with nothing is being returned from the php script to essentials, you need to echo or print the results in the php script then essentials will use that


Yeah I did do that I'm really busy lately so I'll get to this soon....
 
Alright guys I fixed up the summary screen and I have made a few adjustments to the GTS_Get.php file, hope this helps out some people.

@Salva: Don't use the old MySQL script from Berka, modify the GTS_Get data at the top for the mySQL stuff...


@Desbrina:
Code:
<?php
$host="127.0.0.1";
$user="root";
$pass="";
$base="pokemon";
$port=3306;
$sql=mysql_connect($host,$user,$pass,$base,$port) or die("Cannot connect to MySQL");
$request = $_POST['Request'];

if ($request == "delete_pokemon") {
$code = $_POST['Code'];
$ech="Failed";
$ech=mysql_query("DELETE FROM trades WHERE Code=".mysql_real_escape_string($code)."");
echo($ech);
}

elseif ($request == "taken_pokemon") {
$poke=$_POST['Pokemon'];
$ech=mysql_query("SELECT Taken FROM trades WHERE Pokemon=".mysql_real_escape_string($poke)."");
echo($ech);
}

elseif ($request == "send_pokemon") {
$code=$_POST['Code'];
$poke=$_POST['Pokemon'];
$level=$_POST['Level'];
$level1=$_POST['Level1'];
$level2=$_POST['Level2'];
$wanted=$_POST['Wanted'];
$ech="";
$ech=mysql_query("INSERT INTO trades Code=".mysql_real_escape_string($code).",Pokemon=".mysql_real_escape_string($poke).",Level=".mysql_real_escape_string($level).",Wanted=".mysql_real_escape_string($wanted).",Level1=".mysql_real_escape_string($level1).",Level2=".mysql_real_escape_string($level2).",Taken=".mysql_real_escape_string("No")."");
echo($ech);
}

elseif ($request == "get_pokemon") {
$poke=$_POST['Pokemon'];
$level1=$_POST['Level1'];
$level2=$_POST['Level2'];
$ech=mysql_query("SELECT * FROM trades WHERE Pokemon=".mysql_real_escape_string($poke)." and Level>".mysql_real_escape_string($level1)." and Level<".mysql_real_escape_string($level2)."") or print("None");
echo($ech);
}

elseif ($request == "pokemon_taken") {
$code=$_POSY['Code'];
$ech=mysql_query("Update trades SET Taken='Yes' WHERE Code=".mysql_real_escape_string($code)."");
echo($ech);
}

elseif ($request == "get_all") {
$test="VVA";
$ech=mysql_query("INSERT INTO trades Code=".mysql_real_escape_string($test)."") or $ech="Failed";
echo($ech);
$ech=mysql_query("SELECT * FROM trades");
echo($ech);
}

$sql_close;

?>

that's my php script, I don't know why some people don't get data from it...


EDIT: It's difficult fixing up errors that don't even happen to me the Summary screen is the only Error I get...
 
Last edited:
There isn't an option to put the pokemon on the gts?
Also, when searching for a pokemon, it doesn't pop up anything really, it says though something about a T variable in www.
I can't copy paste it sorry.
 
why don't you make a video tutorial explaining how to configure all the scripts and things like that?
 
Or just add scripts, which are DONE and when they are DONE they should WORK.
None of them fits to your screwed up script.
 
Or just add scripts, which are DONE and when they are DONE they should WORK.
None of them fits to your screwed up script.

It is very rude and ignorant to be be putting down someone that is trying to put something out there for the public to use for their games. We are all lucky that Ho-oh is even doing this for the community because if he really didn't want to help out people in the forums of PC then he wouldn't.
 
Last edited:
There is a difference between releasing a script and sayin its not completed nor working.
Hoohs releasing script and saying its complete. (See first post)
For me, he is trying to get fame before bla bloob u knowwhat i mean
 
There is a difference between releasing a script and sayin its not completed nor working.
Hoohs releasing script and saying its complete. (See first post)
For me, he is trying to get fame before bla bloob u knowwhat i mean

Only thing about coding, the script needs to be released before it's done to see what problems occur for others to make sure maximum stability in the code is available for everyone to enjoy.
 
It is very rude and ignorant to be be putting down someone that is trying to put something out there for the public to use for their games. We are all lucky that Ho-oh is even doing this for the community because if he really didn't want to help out people in the forums of PC then he wouldn't.

Thanks man
ALSO I can't script well BECAUSE I HAD A VIRUS ON MY PC AND MY DAD WAS IN THE HOSPITAL
 
Thanks man
ALSO I can't script well BECAUSE I HAD A VIRUS ON MY PC AND MY DAD WAS IN THE HOSPITAL

I understand but at least you try. And you have been doing well with it. And I just don't think he understands that not everyone gets the same exact errors sometimes and like Rai Rai said it needs to be released to see what errors others get too. I don't see overstood trying to script and doing that on their own.
 
I understand but at least you try. And you have been doing well with it. And I just don't think he understands that not everyone gets the same exact errors sometimes and like Rai Rai said it needs to be released to see what errors others get too. I don't see overstood trying to script and doing that on their own.

Yeah I'm working on a fix because I messed with the essentials settings a bit now I get some new errors I'm fixing up...
 
Fixes: A lot completely new PHP file and a heavy set of testing:

Errors: The PHP file won't update the taken pokemon.
 
Looks great and all, I even tried to test it out, but d'you think we could get a tutorial, either text- or video-based, for those of us who don't know how to set it up?

yeah sure I could do that.
 
I have error.

Spoiler:
 
Back
Top