• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

15
Posts
12
Years
  • Seen May 17, 2012
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
 
772
Posts
13
Years
  • Age 35
  • UK
  • Seen Apr 1, 2024
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
 
23
Posts
12
Years
  • Seen Mar 29, 2014
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
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
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....
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
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:
23
Posts
12
Years
  • Seen Mar 29, 2014
why don't you make a video tutorial explaining how to configure all the scripts and things like that?
 
15
Posts
12
Years
  • Seen May 17, 2012
Or just add scripts, which are DONE and when they are DONE they should WORK.
None of them fits to your screwed up script.
 

DarkShadow21

Master of dark fire!!
57
Posts
14
Years
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:
15
Posts
12
Years
  • Seen May 17, 2012
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
 

Rai Rai

Master of everything!
262
Posts
13
Years
  • Seen Aug 29, 2012
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.
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
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
 

DarkShadow21

Master of dark fire!!
57
Posts
14
Years
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.
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
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...
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
Fixes: A lot completely new PHP file and a heavy set of testing:

Errors: The PHP file won't update the taken pokemon.
 

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
I have error.

Spoiler:
 
Back
Top