PDA

View Full Version : [Essentials script] Ho-oh 112's mySQL Trade System


Ho-oh 112
March 7th, 2012, 03:00 PM
Updates:
Fixed up Summary Screen error....

Version 2.0 progress:
Completed

Version 2.0 Full

Bugs: The Storage screen doesn't disapear until a few seconds after you select the trade pokemon
when offline(when it can't find a match for the pokemon) you can find a "" pokemon which is has these attributes: name "", level 0, wants 0, level 0-0 and then it crashes after trying to trade
Summary screen won't load so I removed it until I fix it.
and the GTS sartup box will stick for a few steps...

DON'T REPORT THESE BUGS! ONLY BUGS NOT LISTED!

Features:
Custom species restrictions (seen/owned/all)
Custom user level restrictions (levels 1-Maxlevel)
Sends data to a .php file and sends that to the database since nobody can figure out the mySQL support by berka...

Todo:
Actually make the .php file for everyone...


Tutorial:
1. Extract the zip
2. replace the old pokebattle_Pokemon script with pokebattle_pokemon2.0 script
3. replace the old PokemonStorage script with the contents of PokemonStorage.txt
4. make a new script section and place the trade script in there.
5. test it out and report if any errors happen.

CALL WITH: pbStartGTS()

Finally the .zip file:
63866

Credits:
Me - Main system
Poccil - For the base pokemon stoarage script(modified by me)
Desbrina - Helping improve the PHP script

salva123
March 7th, 2012, 06:36 PM
good work, but how do I call the script?

Ho-oh 112
March 7th, 2012, 07:21 PM
good work, but how do I call the script?


Searching for a pokemon: pbShowSearchList()
Uploading a pokemon: pbUploadList()
Showing Uploaded Summary: pbShowTradeSummary()
Checking to see if your trade has been taken: pbCheckGotten()



ALSO, IGNORE THE OTHER THREAD, IT WAS AN ACCIDENTAL DUPLICATE.

salva123
March 7th, 2012, 07:38 PM
do I have to change something in the script? because everytime that I try to connect it tells me unable to connect

Ho-oh 112
March 8th, 2012, 06:05 AM
do I have to change something in the script? because everytime that I try to connect it tells me unable to connect




Well, have you configured the mySQL script?

venom12
March 8th, 2012, 06:50 AM
I put my pass host etc in and still cant connect to database.

Ho-oh 112
March 8th, 2012, 07:42 AM
I put my pass host etc in and still cant connect to database.



does it print it out(like a regular problem report) or say it in a Kernel.pbMessage(standard messaging)

venom12
March 8th, 2012, 07:53 AM
Normal kernelmessage, dont know why weird ;]

Ho-oh 112
March 8th, 2012, 08:03 AM
Normal kernelmessage, dont know why weird ;]


Ok, it's a problem with my script, worked fine yesterday though.... I'll go fix it. Or if you want to try and fix it remove these lines ONLY THOSE 3:

rescue
Kernel.pbMessage(_INTL("There was an error, we must cancel the Trade."))
return false


then check the error report.

venom12
March 8th, 2012, 08:08 AM
Ok, it's a problem with my script, worked fine yesterday though.... I'll go fix it. Or if you want to try and fix it remove these lines ONLY THOSE 3:

rescue
Kernel.pbMessage(_INTL("There was an error, we must cancel the Trade."))
return false


then check the error report.


No i dont get this error i got error from mysql unable to connect.

Ho-oh 112
March 8th, 2012, 08:13 AM
No i dont get this error i got error from mysql unable to connect.


something to do with your connection then

MaTe9usz6
March 8th, 2012, 08:21 AM
When i change your mysql setting to my, and i calling the script: pbSqlConnect. I have a message:

The script is taking too long.
The game will restart.

P. S.

Can you rec the yt film how this script works?

Ho-oh 112
March 8th, 2012, 08:29 AM
When i change your mysql setting to my, and i calling the script: pbSqlConnect. I have a message:

The script is taking too long.
The game will restart.

P. S.

Can you rec the yt film how this script works?

That's because it's trying to connect but one of the following is happening:

Your connection to the internet is slow

Your connection to the SQL database is slow

You lost connection to the internet/sql connection for even a second (happened to me before)

Your mySQL database doesn't have external connections avaible

Your mySQL doesn't have remote SSH access


OR your PC is just slow (which is the least likely to be)

the reseting of the game is built into Essentials meaning it's not my script reseting. Make sure you have ALL the following corrected.


EDIT:
I for some reason cannot edit the first post because it tells me "This website is currently offline."
After I get that problem solved I'll make a tutorial for this

pokemonmasteraaron
March 8th, 2012, 02:36 PM
Hey, ho-oh dude.
I'm really nervous about editting the scripts.
I'm blind, so to edit, I have to select all, copy, paste in to notepad, then dldelete the old script, than paste in my modified script.
So, I've got a big favor to ask.
Could you copy all of the editted scripts in to separate text files and upload them for me?
You'd only have to do like the mysql, storiage box, and the actual script, and only about 0-2 more.
I could edit the scripts in the txts you gave me, and then paste them in.
I would feal much more secure.
Even with backups, I get so nervous.
Back when I was little and played g/s/c, I would save after every 1-5 battles, lol.
Also, one last thing.
Do all I have to do, not to do with scripts, is make a mysql account and put libmysql.dll in my game's root?
Or is there more?
Help in very appreciated, thanks!

Ho-oh 112
March 8th, 2012, 02:59 PM
Hey, ho-oh dude.
I'm really nervous about editting the scripts.
I'm blind, so to edit, I have to select all, copy, paste in to notepad, then dldelete the old script, than paste in my modified script.
So, I've got a big favor to ask.
Could you copy all of the editted scripts in to separate text files and upload them for me?
You'd only have to do like the mysql, storiage box, and the actual script, and only about 0-2 more.
I could edit the scripts in the txts you gave me, and then paste them in.
I would feal much more secure.
Even with backups, I get so nervous.
Back when I was little and played g/s/c, I would save after every 1-5 battles, lol.
Also, one last thing.
Do all I have to do, not to do with scripts, is make a mysql account and put libmysql.dll in my game's root?
Or is there more?
Help in very appreciated, thanks!

I'll upload .txt files after I can finally edit the first post, I've already sent in my problem but I didn't get a reply yet, I guess it's because it's a large post.

Also, you don't make the mySQL account you make the database (but in the same respective it's still an account) so yeah that's about all you also have to configure the settings (listed at the top of the mySQL support script) so that your settings are there.

pokemonmasteraaron
March 8th, 2012, 04:29 PM
which mysql to I need?
There's a lot.
mysql cluster, and a few others.
Right now, I'm hoping mysql is compatible with screen readers.
Probably, as it seems wrather popular.
Then again, it might not.
FLStudio, the number 1 midi sequencer, camtasia, a popular screen recorder, and Norton (a virus protecter) don't work with screen reader tecnology.
Thanks, your gonna make my game awesome!

Nevermind, I got a mysql installed (server and mysql workbench)

How do I get my sql server running though?
I suppose I need to know that before I put in the scripts anyway.
Do I have to like put it on a website?
Or can I (for now) use my pc as the server?

overstood
March 9th, 2012, 01:48 AM
I get client crash and errors. Please give a step by step instruction or upload the scripts. Would really appreciate this.
Nice Script though.
One more question; is it possible to list ALL Pokemon which were uploaded instead just of them you have seen?

Ho-oh 112
March 9th, 2012, 06:48 AM
which mysql to I need?
There's a lot.
mysql cluster, and a few others.
Right now, I'm hoping mysql is compatible with screen readers.
Probably, as it seems wrather popular.
Then again, it might not.
FLStudio, the number 1 midi sequencer, camtasia, a popular screen recorder, and Norton (a virus protecter) don't work with screen reader tecnology.
Thanks, your gonna make my game awesome!

Nevermind, I got a mysql installed (server and mysql workbench)

How do I get my sql server running though?
I suppose I need to know that before I put in the scripts anyway.
Do I have to like put it on a website?
Or can I (for now) use my pc as the server?

for localhost you can use your pc as the server but only locally, otherwise you'll need to find a web/sql host which can meet all the requirments you need.


I get client crash and errors. Please give a step by step instruction or upload the scripts. Would really appreciate this.
Nice Script though.
One more question; is it possible to list ALL Pokemon which were uploaded instead just of them you have seen?

1. I'll make a guide as soon as I can edit the post(I'll try after posting this)

2. Upload the scripts? I already put them up.

3. I'll make a configuration setting for it.

overstood
March 9th, 2012, 07:31 AM
In fact i Meant the Script.rgss data. Or a project file. Coz for now it wont work for me.
Don't know what to do, tried a lot.

Installed 1:1 like your manual:

---------------------------

---------------------------
Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: ArgumentError

Message: (eval):1:in `pbUploadList'wrong number of arguments(0 for 1)

***Full script:

pbUploadList()


Interpreter:243:in `pbExecuteScript'

(eval):1:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243: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'



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'

Ho-oh 112
March 9th, 2012, 07:45 AM
In fact i Meant the Script.rgss data. Or a project file. Coz for now it wont work for me.
Don't know what to do, tried a lot.

Installed 1:1 like your manual:

---------------------------

---------------------------
Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: ArgumentError

Message: (eval):1:in `pbUploadList'wrong number of arguments(0 for 1)

***Full script:

pbUploadList()


Interpreter:243:in `pbExecuteScript'

(eval):1:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243: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'



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'




right: 63752


Scripts.rxdata is in the .zip


EDIT:
Oh, your problem is that you didn't define a pokemon yet for the player to upload (you were looking at the wanted/wanted level range pokemon)

You've got to define a player's pokemon, using something like pbChooseSpecies or something.

overstood
March 9th, 2012, 07:54 AM
Same error with your scripts.rxdata.
Tells when i use pbUploadList()
'Message: (eval)in `pbUploadList'wrong number of arguments(0 for 1)'

Help please?

Ho-oh 112
March 9th, 2012, 08:18 AM
Same error with your scripts.rxdata.
Tells when i use pbUploadList()
'Message: (eval)in `pbUploadList'wrong number of arguments(0 for 1)'

Help please?


YOU HAVN'T DEFINED THE POKEMON!
do this:

pokemondatahere=pbChoosePokemon(1,3)
pbUploadList(pokemondatahere)


Allows you to choose 1 pokemon in your party

pokemonmasteraaron
March 9th, 2012, 08:19 AM
I'm still confused about how to work my sql.
What would you say a good sql host for free is,
If any?
BTW, I don't think I'll need those text files now that I downloaded that scripts.zip file from your earlier post.
Thanks, all though I am still nervous about editting them, I think I can make it work.
What seems more important at the moment is getting a my sql up and running.
Also, when I do find a mysql host, how would I upload my database?
Lastly, how do I edit the mysql scripts on the mysql server or whatever?
Here's what I've done so far with mysql.
Downloaded mysql installer from Mysql.com.
Installed the .msi.
It includes (server and workbench).
I'm sorry for seeming to be an idiet.
I've just never worked with mysql before.

Ho-oh 112
March 9th, 2012, 08:33 AM
I'm still confused about how to work my sql.
What would you say a good sql host for free is,
If any?
BTW, I don't think I'll need those text files now that I downloaded that scripts.zip file from your earlier post.
Thanks, all though I am still nervous about editting them, I think I can make it work.
What seems more important at the moment is getting a my sql up and running.
Also, when I do find a mysql host, how would I upload my database?
Lastly, how do I edit the mysql scripts on the mysql server or whatever?
Here's what I've done so far with mysql.
Downloaded mysql installer from Mysql.com.
Installed the .msi.
It includes (server and workbench).
I'm sorry for seeming to be an idiet.
I've just never worked with mysql before.


Nah, it's ok.

here's 2 websites:
http://xeround.com DATABASEONLY, minimum connections allowed for free (bad)
http://astahost.com actual website host (with mySQL) I haven't used this yet

and you don't need to upload your database, although you can export your database to a .sql file and upload them again to your database host.

pokemonmasteraaron
March 9th, 2012, 08:49 AM
You mean I never had to install mysql?!
hahaha.
Anyway, I'll get to work on that.
Things are looking pretty good.
I've got the scripts in my game now, but haven't editted them yet.
I'm going to wait until I get my mysql database setup.
I don't know why, but your scripts.rxdata didn't work in my backup.
I exported the ones I needed in to my main project, though, and it works fine.

Ho-oh 112
March 9th, 2012, 10:49 AM
You mean I never had to install mysql?!
hahaha.
Anyway, I'll get to work on that.
Things are looking pretty good.
I've got the scripts in my game now, but haven't editted them yet.
I'm going to wait until I get my mysql database setup.
I don't know why, but your scripts.rxdata didn't work in my backup.
I exported the ones I needed in to my main project, though, and it works fine.


I don't know why the scripts.rxdata didn't work though, but glad to see exporting the scripts seperatly works.

pokemonmasteraaron
March 9th, 2012, 10:54 AM
will freemysql.net work?
I'm having trouble creating a database with xeround.

It's really only my blindness that's getting in the way though, it isn't the website's falt.

overstood
March 9th, 2012, 11:20 AM
i get this error now :/



Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: NoMethodError

Message: Section142:363:in `pbUploadPokemonGTS'undefined method `pbConnectSql' for #<Interpreter:0x9726c78>

***Full script:

PokeData=pbChoosePokemon(1,3)
pbUploadList(PokeData)


Interpreter:243:in `pbExecuteScript'

mySQL Trade:355:in `pbUploadList'

mySQL Trade:299:in `loop'

mySQL Trade:359:in `pbUploadList'

(eval):2:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



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'

Ho-oh 112
March 9th, 2012, 11:31 AM
i get this error now :/



Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: NoMethodError

Message: Section142:363:in `pbUploadPokemonGTS'undefined method `pbConnectSql' for #<Interpreter:0x9726c78>

***Full script:

PokeData=pbChoosePokemon(1,3)
pbUploadList(PokeData)


Interpreter:243:in `pbExecuteScript'

mySQL Trade:355:in `pbUploadList'

mySQL Trade:299:in `loop'

mySQL Trade:359:in `pbUploadList'

(eval):2:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



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'


that's something in my script.

will freemysql.net work?
I'm having trouble creating a database with xeround.

It's really only my blindness that's getting in the way though, it isn't the website's falt.


yes.

overstood
March 9th, 2012, 11:36 AM
Can you fix it/ tell me how to fix?

Ho-oh 112
March 9th, 2012, 11:47 AM
Can you fix it/ tell me how to fix?


check first post, I uploaded a .zip file with the fix.

if it still doesn't work:

rename everything in the script that says:

pbconnectSql()
to:
pbSqlConnect()


I mixed up the names of them.

pokemonmasteraaron
March 9th, 2012, 12:12 PM
So, does this look right?
I won't know if it works until somebody who can see gets home and reads me the event I've setup.

Host = "SQL09.FREEMYSQL.NET" # mysql server(local : 127.0.0.1)
User = "aaronbaker" # mysql user
Pass = "freemysql password (note that isn't my password!)" # mysql password
Base = "pokemontourney" # base name
Port = 3306 # server port (default: 3306)
I wasn't sure what port to put, as I didn't see one listed in my database
As I said, I won't know if it worked until somebody get's home, but I do know I don't get any
exeption run time errors
or any other errors that cut off the game.

Ho-oh 112
March 9th, 2012, 01:17 PM
So, does this look right?
I won't know if it works until somebody who can see gets home and reads me the event I've setup.

Host = "SQL09.FREEMYSQL.NET" # mysql server(local : 127.0.0.1)
User = "aaronbaker" # mysql user
Pass = "freemysql password (note that isn't my password!)" # mysql password
Base = "pokemontourney" # base name
Port = 3306 # server port (default: 3306)
I wasn't sure what port to put, as I didn't see one listed in my database
As I said, I won't know if it worked until somebody get's home, but I do know I don't get any
exeption run time errors
or any other errors that cut off the game.


Looks fine to me, also I'll be adding a .sql file that holds the correct table for the trades later.

pokemonmasteraaron
March 9th, 2012, 05:56 PM
Well, it isn't right.
I have some ideas on fixing it, but I'm still going to tell you the simptums incase it isn't a server problem.
One.
When uploading my ivysaur to the database, I get an acception run time error.


---------------------------
Pokémon Tourney, The corrupted soul
---------------------------
Script 'Interpreter' line 275: RuntimeError occurred.

Script error within event 12, map 1 (Pokemon Center):Exception: NoMethodErrorMessage: Section144:363:in `pbUploadPokemonGTS'undefined method `pbConnectSql' for #<Interpreter:0x87bfe78>***Full script:pokemondatahere=pbChoosePokemon(1,3)
pbUploadList(pokemondatahere)
Interpreter:243:in `pbExecuteScript'mySQL Trade:355:in `pbUploadList'mySQL Trade:299:in `loop'mySQL Trade:359:in `pbUploadList'(eval):2:in `pbExecuteScript'Interpreter:1592:in `eval'Interpreter:243:in `pbExecuteScript'Interpreter:1592:in `command_355'Interpreter:493:in `execute_command'Interpreter:193:in `update'
---------------------------
OK
---------------------------

When searching.
Game freezes, and than
Rgss player has stoped responding.
Windows is looking for a solution to the problem.
Or something like that.

overstood
March 9th, 2012, 09:59 PM
After the ''fix''



---------------------------
Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: NoMethodError

Message: Section142:363:in `pbUploadPokemonGTS'undefined method `pbpbSqlConnect' for #<Interpreter:0x99908a0>

***Full script:

PokeData=pbChoosePokemon(1,3)
pbUploadList(PokeData)


Interpreter:243:in `pbExecuteScript'

mySQL Trade:355:in `pbUploadList'

mySQL Trade:299:in `loop'

mySQL Trade:359:in `pbUploadList'

(eval):2:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



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'

pokemonmasteraaron
March 10th, 2012, 05:44 AM
After the ''fix''



---------------------------
Exception: RuntimeError

Message: Script error within event 13, map 38 (Route 1):

Exception: NoMethodError

Message: Section142:363:in `pbUploadPokemonGTS'undefined method `pbpbSqlConnect' for #<Interpreter:0x99908a0>

***Full script:

PokeData=pbChoosePokemon(1,3)
pbUploadList(PokeData)


Interpreter:243:in `pbExecuteScript'

mySQL Trade:355:in `pbUploadList'

mySQL Trade:299:in `loop'

mySQL Trade:359:in `pbUploadList'

(eval):2:in `pbExecuteScript'

Interpreter:1593:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1593:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'



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'


I got a similar error see above post.
I thought it was because of mysql database, but maybe not if you get an almost identical error.

venom12
March 11th, 2012, 04:50 AM
I dont know what is it with that but first i got "script is hanging. the game will restart." then unable to connect to database. I have set up everything but nothing works.

overstood
March 11th, 2012, 05:21 AM
I dont know what is it with that but first i got "script is hanging. the game will restart." then unable to connect to database. I have set up everything but nothing works.

I feel the same.

Please don't contribute Scripts which are just not working.
.___________.''

p.claydon
March 11th, 2012, 01:45 PM
yh this scripts just does not work for me

pokemonmasteraaron
March 11th, 2012, 03:45 PM
there's probably just some simple explanation, the script is setup well, there's just something we're missing.
Hopefully Ho-oh112 will get back to us soon.

Ho-oh 112
March 12th, 2012, 06:13 AM
sorry for being offline, but that's not my script, it's the connection with the mySQL server.


EDIT: Fixed up the error report.

pokemonmasteraaron
March 12th, 2012, 07:45 AM
what about my earlier posts.
the rgss player and the script error?

Ho-oh 112
March 12th, 2012, 08:04 AM
what about my earlier posts.
the rgss player and the script error?



The rgss player not working is something I'm looking into currently, like I said it did work before

and the other error I don't know really, but I'm looking into that too (I think they are related issues)


EDIT: I relooked at your post, you didn't update yet, please get the new trade (you only need to re-import the trade script.)

pokemonmasteraaron
March 12th, 2012, 08:50 AM
that fixed the script error.
I don't get any script errors now, just rgss player stops responding for both uploading to, and searching the database.
Let me know if you figure something out.

Ho-oh 112
March 13th, 2012, 06:07 AM
that fixed the script error.
I don't get any script errors now, just rgss player stops responding for both uploading to, and searching the database.
Let me know if you figure something out.



Yeah, I'm looking into that too, but you don't get the "Unable to connect to the database error" right?

pokemonmasteraaron
March 13th, 2012, 09:24 AM
No.
I changed hosts to db4free and got one, but I switched back to freemysql.net and I don't get any errors, not even failed to conect to the database.
Just the rgss problem.
I can only assume it actually is conecting, but it is confused on how to operate the database?

Ho-oh 112
March 13th, 2012, 10:44 AM
No.
I changed hosts to db4free and got one, but I switched back to freemysql.net and I don't get any errors, not even failed to conect to the database.
Just the rgss problem.
I can only assume it actually is conecting, but it is confused on how to operate the database?



no, I think it's my script's problem... I had this once but I forgot how to fix it...

pokemonmasteraaron
March 13th, 2012, 12:50 PM
o-right.
I'm not really a scripter, at all, so I wouldn't know what the problem is.
I don't think there are really any scripting tutorials out there.
I tried making a script once, but I went about it the wrong way.
It was supposed to run an application in the game folder.
It was only three lines, and it epically failed.

Ho-oh 112
March 13th, 2012, 01:56 PM
o-right.
I'm not really a scripter, at all, so I wouldn't know what the problem is.
I don't think there are really any scripting tutorials out there.
I tried making a script once, but I went about it the wrong way.
It was supposed to run an application in the game folder.
It was only three lines, and it epically failed.


No I'm working on the fix + version 2.0

pokemonmasteraaron
March 13th, 2012, 04:56 PM
I'll check back on this thread daily for the update.
Thanks, this is going to be awesome

Ho-oh 112
March 14th, 2012, 06:18 AM
I'll check back on this thread daily for the update.
Thanks, this is going to be awesome


Right I'm going to need to wait on this for a day, so it might be friday.

mappel6
March 15th, 2012, 11:15 AM
I'm using freemysql.net, and I am getting problems connecting to the database. I have an Internet connection, and have checked it and saw it working every time. I just couldn't connect. I have set up the 5 rows of the table 'trades' on the database, and they are all set to int. Is there something wrong with this setup? Also, here's how I configured the script.

Host = "sql09.freemysql.net" # mysql server(local : 127.0.0.1)
User = "mappel6" # mysql user
Pass = "********" # mysql password(NOT SHOWING MY REAL PASS)
Base = "pkvoid" # base name
Port = 3306 # server port (default: 3306)

EDIT: This was the exact error that popped up:
mySQL:
Unable to connect to the database.

If it's a problem with the database, which I'm sure it is, can you upload that .sql file soon? Thanks.

REEDIT: Turns out they were columns. I, and most likely every one else here, needs that file, or some setup tutorial.

Ho-oh 112
March 16th, 2012, 06:20 AM
I'm using freemysql.net, and I am getting problems connecting to the database. I have an Internet connection, and have checked it and saw it working every time. I just couldn't connect. I have set up the 5 rows of the table 'trades' on the database, and they are all set to int. Is there something wrong with this setup? Also, here's how I configured the script.

Host = "sql09.freemysql.net" # mysql server(local : 127.0.0.1)
User = "mappel6" # mysql user
Pass = "********" # mysql password(NOT SHOWING MY REAL PASS)
Base = "pkvoid" # base name
Port = 3306 # server port (default: 3306)

EDIT: This was the exact error that popped up:
mySQL:
Unable to connect to the database.

If it's a problem with the database, which I'm sure it is, can you upload that .sql file soon? Thanks.

REEDIT: Turns out they were columns. I, and most likely every one else here, needs that file, or some setup tutorial.


OK I AM DELAYING 2.0 AND MAKING THIS SOOOOOOO EASY TO USE YOU WONT NEED TO STRUGGLE WITH BERKA'S MYSQL SCRIPT! (delaying it for major updates.)

Heres what I plan:
connects to a .php file online using a sockets script and then connecting to a database with that and inserting it into the database through there same with getting the stuff.

overstood
March 18th, 2012, 12:42 AM
You know how long it might take?

Ho-oh 112
March 18th, 2012, 05:38 AM
You know how long it might take?


A while heres whats got to be done:

Sockets sending script for essentials

php sockets receive script (which will then send SQL queries to your database and receive the data and send it back through sockets)
re-make my system to support the updates

pokemonmasteraaron
March 18th, 2012, 08:46 AM
Will it be finished by may or june?
That is the expected release date for my game Pokémon Tourney, the corrupted soul.

Ho-oh 112
March 18th, 2012, 04:42 PM
Will it be finished by may or june?
That is the expected release date for my game Pokémon Tourney, the corrupted soul.


moslt likely sooner, I got school to do, lots of changes, and depends on if I play minecraft....

pokemonmasteraaron
March 18th, 2012, 05:56 PM
Of corse, you have to be a mind craft player, don't yah?
hahaha.
Well, I understand about school.
:(

Ho-oh 112
March 18th, 2012, 06:04 PM
Of corse, you have to be a mind craft player, don't yah?
hahaha.
Well, I understand about school.
:(

Yeah.... School is school minecraft is locked up in a sd card until I finish it.

pokemonmasteraaron
March 21st, 2012, 06:20 AM
So, since this is a beta, is it worth putting in my game?

I like how now there's only one script you have to call, but now I have to take away the event I made.

You really have been working hard on this, and I'm glad your not giving up on us.
I'm sure, once everything's over and your script is ready to use with little error, you will be in the credits section of many a game.
Thanks so much.
BTW your awesome :).

Ho-oh 112
March 21st, 2012, 06:57 AM
So, since this is a beta, is it worth putting in my game?

I like how now there's only one script you have to call, but now I have to take away the event I made.

You really have been working hard on this, and I'm glad your not giving up on us.
I'm sure, once everything's over and your script is ready to use with little error, you will be in the credits section of many a game.
Thanks so much.
BTW your awesome :).

Scripts:
Trade,
PokemonStorage,
PokeBattle_Pokemon 2.0
Other scripts:
php file

beta features only it can be put into your game but it won't have any use currently the errors currently are very minor but I can fix em after the php file, that may take a few days since I'm bad at php online things....

pokemonmasteraaron
March 21st, 2012, 07:06 AM
Well, a few days is better than a few weeks, and much better than a few munths, so I'll wait.
We are going to still need our own mysql database, right?

Ho-oh 112
March 21st, 2012, 07:10 AM
Well, a few days is better than a few weeks, and much better than a few munths, so I'll wait.
We are going to still need our own mysql database, right?


Yes, you will need your own database to store the trades and a website to use your php file....

pokemonmasteraaron
March 21st, 2012, 07:16 AM
oh.
So dropbox wouldn't work?
It's a download service that allows automatic downloads.

Ho-oh 112
March 21st, 2012, 07:34 AM
oh.
So dropbox wouldn't work?
It's a download service that allows automatic downloads.


No it needs to connect to the file not downlad it.

Ho-oh 112
March 21st, 2012, 05:05 PM
Right so I decided to give a video to how to GTS works.

63875

since I don't have a youtube account you'll need to download it....

updates: fixed up a few glitches.

salva123
March 21st, 2012, 05:24 PM
where do you insert pokemonbattler script? I have to make a new script or do I have to replace it in one?

pokemonmasteraaron
March 21st, 2012, 06:16 PM
@salva123 You replace the contense of poke battle pokemon.
@ho-oh112, but I thought since evilcabbage's update application could check the file online and dropbox works, I thought this php thing would.
Guess not, I'm not sue where'd I'd put the php file though.
I'll break that barier when I get to it.

Ho-oh 112
March 21st, 2012, 06:51 PM
@salva123 You replace the contense of poke battle pokemon.
@ho-oh112, but I thought since evilcabbage's update application could check the file online and dropbox works, I thought this php thing would.
Guess not, I'm not sue where'd I'd put the php file though.
I'll break that barier when I get to it.


the php file goes like this:

yourdomain.com/GTS.php

which means you'll need an FTP account + a webhost (use zymic.com that is how I'm going to test it...)

pokemonmasteraaron
March 22nd, 2012, 10:42 AM
Looks to me like you could host your database there too, right?

Ho-oh 112
March 22nd, 2012, 12:13 PM
Looks to me like you could host your database there too, right?


yes, zymic.com allows for FTP, MySQL, Ect.

pokemonmasteraaron
March 22nd, 2012, 01:16 PM
Cool.

That hasta make it like the best free website maker out there.
I like how I can make my own webpages in html and upload them, too.
I didn't see any thing about allowing php though, but it isn't an emediate concern.

overstood
March 22nd, 2012, 01:28 PM
when is 2.0 finished? thanks for answer

Ho-oh 112
March 22nd, 2012, 01:29 PM
Cool.

That hasta make it like the best free website maker out there.
I like how I can make my own webpages in html and upload them, too.
I didn't see any thing about allowing php though, but it isn't an emediate concern.

it has PHP you can use, I've tried before.

pokemonmasteraaron
March 22nd, 2012, 06:09 PM
I think I get it now.
I use the ftp upload thingy and upload the php file one you release it?
Using filezilla or whatever?

Ho-oh 112
March 22nd, 2012, 06:41 PM
I think I get it now.
I use the ftp upload thingy and upload the php file one you release it?
Using filezilla or whatever?


yeah that's how it's done (then you take the link and place it in the trade script.)

pokemonmasteraaron
March 23rd, 2012, 05:25 AM
Sounds great.
I'll just wait now, thanks for all your help, man!

Ho-oh 112
March 23rd, 2012, 05:40 AM
Sounds great.
I'll just wait now, thanks for all your help, man!

It might be done today if I can fix an error that I can't find, also I've got a newer version of the trade script itself that has major bug fixes, the php and script will be release on the same day.

pokemonmasteraaron
March 23rd, 2012, 03:36 PM
that sounds great, I'll check back some time tomorrow.

Ho-oh 112
March 26th, 2012, 05:51 AM
that sounds great, I'll check back some time tomorrow.

Sorry for the script not being done but I took the weekend off.... (Translation: Minecraft...)

pokemonmasteraaron
March 28th, 2012, 05:09 PM
You needed to relax anyway.

btw, I'm the 2012th viewer of this thread :P

Ho-oh 112
March 28th, 2012, 07:35 PM
You needed to relax anyway.

btw, I'm the 2012th viewer of this thread :P

sorry I'm taking a few off of this I really gotta relax rather than script myself out.

overstood
March 28th, 2012, 10:57 PM
i knew it. u cant script. copiing the script failed and youhave no idea what to do.
my opinion cya

Ho-oh 112
March 29th, 2012, 04:49 AM
i knew it. u cant script. copiing the script failed and youhave no idea what to do.
my opinion cya

????? I'm taking a break because I found a new game called edgeworld you dope AND WHERE DID I COPY THIS FROM?? I MADE IT FROM SCRATCH!!!!

Note: Scripting myself out for a week can be tiring so DON'T SAY IT'S NOT HARD WORK!

MaTe9usz6
March 29th, 2012, 05:08 AM
I can't wait to php file, please make it quickly.

Ho-oh 112
March 29th, 2012, 05:46 AM
I can't wait to php file, please make it quickly.

I'm starting to script again tommorow or next monday. so it'll be done before long.

Ho-oh 112
April 2nd, 2012, 05:29 AM
UPDATES:

Hey people I got the base structure of the php file ready! It's only a very unstable base but if you can improve fix any errors I didn't find then please do so.


<?php
$host="Localhost";
$user="root";
$pass="";
$base="pokemon";
$port=3306;
$sql=mysql_connect($host,$user,$pass,$base,$port) or die("Cannot connect to MySQL");
$request = $_GET['Request'];

if ($request == "delete_pokemon") {
$code = $_GET['Code'];
mysql_query("DELETE FROM Trades WHERE Code=$code") or die("Cannot delete".$code."From Trades");
}

if ($request == "taken_pokemon") {
$poke=$_GET['Pokemon'];
$ech=mysql_query("FROM Trades SELECT Taken WHERE Pokemon=$poke") or die("Cannot Select".$Poke."From Trades");
}

if ($request == "send_pokemon") {
$code=$_GET['Code'];
$poke=$_GET['Pokemon'];
$level=$_GET['Level'];
$level1=$_GET['Level1'];
$level2=$_GET['Level2'];
$wanted=$_GET['Wanted'];
mysql_query("INSERT INTO Trades Code=$code,Pokemon=$poke,Level=$level,Wanted=$wanted,Level1=$level1,Level2=$level2,Taken='No'") or die("Cannot insert Query.");
}

if ($request == "get_pokemon") {
$poke=$_GET['Pokemon'];
$level1=$_GET['Level1'];
$levle2=$_GET['Level2'];
$ech=mysql_query("FROM Trades SELECT * WHERE Pokemon=$poke and Level>$level1 and Level<$level2") or die("None");
}

if ($request == "get_all") {
$ech=mysql_query("FROM Trades SELECT *") or die("Error!");
}
die($ech);
$sql_close;

?>

venom12
April 2nd, 2012, 07:03 AM
Ok so i tested it, i got few errors, pokemon stores online but cant finish trade + some bugs. here are screens.
First screen Pokemon is stored but is not on the lsit but when i press space it continue.
http://dl.dropbox.com/u/4212314/Gts%20errpr/capture018.png

And here is something messed
http://dl.dropbox.com/u/4212314/Gts%20errpr/capture019.png

and error when want to finish trade.
Exception: RuntimeError
Message: Script error within event 18, map 11 (Pokój Simona):
Exception: NoMethodError
Message: Section171:88:in `pbCompleteTradeGTS'undefined method `ConvertToString' for 0:Fixnum
***Full script:
pbStartGTS()

Interpreter:243:in `pbExecuteScript'
PokemonGts:474:in `pbGetTradeResults'
PokemonGts:421:in `pbStartSearchGTS'
PokemonGts:406:in `pbSearchListGTS'
PokemonGts:349:in `loop'
PokemonGts:409:in `pbSearchListGTS'
PokemonGts:56:in `pbStartGTS'
PokemonGts:36:in `loop'
PokemonGts:58:in `pbStartGTS'
(eval):1:in `pbExecuteScript'

Ho-oh 112
April 2nd, 2012, 07:13 AM
Ok so i tested it, i got few errors, pokemon stores online but cant finish trade + some bugs. here are screens.
First screen Pokemon is stored but is not on the lsit but when i press space it continue.
http://dl.dropbox.com/u/4212314/Gts%20errpr/capture018.png

And here is something messed
http://dl.dropbox.com/u/4212314/Gts%20errpr/capture019.png

and error when want to finish trade.
Exception: RuntimeError
Message: Script error within event 18, map 11 (Pokój Simona):
Exception: NoMethodError
Message: Section171:88:in `pbCompleteTradeGTS'undefined method `ConvertToString' for 0:Fixnum
***Full script:
pbStartGTS()

Interpreter:243:in `pbExecuteScript'
PokemonGts:474:in `pbGetTradeResults'
PokemonGts:421:in `pbStartSearchGTS'
PokemonGts:406:in `pbSearchListGTS'
PokemonGts:349:in `loop'
PokemonGts:409:in `pbSearchListGTS'
PokemonGts:56:in `pbStartGTS'
PokemonGts:36:in `loop'
PokemonGts:58:in `pbStartGTS'
(eval):1:in `pbExecuteScript'


AHHHH I Forgot to add the new version of the trade system....

EDIT: I'm fixing up some more bugs I found + making the php file better.

charizard124
April 2nd, 2012, 03:07 PM
Thankyou for this awesome feature
Can you help me? after pressing search for pokemon and put the pokemon i want i get this error:

---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 32, map 25 (Test Map 2):

Exception: TypeError

Message: Section143:434:in `+'cannot convert Fixnum into Array

***Full script:

pbStartGTS()


Interpreter:243:in `pbExecuteScript'

tra:434:in `pbGetGTSTradeListing'

tra:417:in `pbStartSearchGTS'

tra:406:in `pbSearchListGTS'

tra:349:in `loop'

tra:409:in `pbSearchListGTS'

tra:56:in `pbStartGTS'

tra:36:in `loop'

tra:58:in `pbStartGTS'

(eval):1:in `pbExecuteScript'



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'

Ho-oh 112
April 2nd, 2012, 03:53 PM
Thankyou for this awesome feature
Can you help me? after pressing search for pokemon and put the pokemon i want i get this error:

---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 32, map 25 (Test Map 2):

Exception: TypeError

Message: Section143:434:in `+'cannot convert Fixnum into Array

***Full script:

pbStartGTS()


Interpreter:243:in `pbExecuteScript'

tra:434:in `pbGetGTSTradeListing'

tra:417:in `pbStartSearchGTS'

tra:406:in `pbSearchListGTS'

tra:349:in `loop'

tra:409:in `pbSearchListGTS'

tra:56:in `pbStartGTS'

tra:36:in `loop'

tra:58:in `pbStartGTS'

(eval):1:in `pbExecuteScript'



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'

still working on a huge fix I noticed a small complicated error that'll take me a few to fix...

venom12
April 3rd, 2012, 07:09 AM
Hope it will be out soon.

Ho-oh 112
April 3rd, 2012, 07:21 AM
Hope it will be out soon.


Yeah I'm going to start working on this before H-Mode 7 until this works I just realized I can't compile the pokemon but I need to instead send all the different values of the pokemon...

desbrina
April 3rd, 2012, 08:18 AM
A few comments about your php script. Bolded is how to improve/fix the issue

First off, pbpPostData in essentials sends requests using $_POST not $_GET.
Any $_GET should be $_POST

Also, any variables you send from the essentials script need to be sanitised before use in php otherwise you'll be open to sql injection which could potentially wipe out your database or have others insert unauthorised data into it if they managed to get hold of the url, which is pretty easy to do
You need to use mysql_real_escape_string() on all variables
e.g.
$ech=mysql_query("FROM Trades SELECT * WHERE Pokemon=".mysql_real_escape_string($poke)." and Level>".mysql_real_escape_string($level1)." and Level<".mysql_real_escape_string($level2)."") or die("None");

Your final $sql_close; at the end won't do anything since anything after a die() call isn't executed. You shouldn't be using die() to output data anyway.
Change the die to an echo or print

Its better to use elseif statements not several ifs since you're only going to be sending one request at once, and for each request its going to go through the whole script each time, which takes more time in the long run than elseif. With elseif it'd go through only until the criteria is met.
Use elseifs
e.g.
if(this>1){
do this
} elseif (this>2) {
do this
} else
do this
}

Ho-oh 112
April 3rd, 2012, 08:28 AM
A few comments about your php script. Bolded is how to improve/fix the issue

First off, pbpPostData in essentials sends requests using $_POST not $_GET.
Any $_GET should be $_POST

Also, any variables you send from the essentials script need to be sanitised before use in php otherwise you'll be open to sql injection which could potentially wipe out your database or have others insert unauthorised data into it if they managed to get hold of the url, which is pretty easy to do
You need to use mysql_real_escape_string() on all variables
e.g.
$ech=mysql_query("FROM Trades SELECT * WHERE Pokemon=".mysql_real_escape_string($poke)." and Level>".mysql_real_escape_string($level1)." and Level<".mysql_real_escape_string($level2)."") or die("None");

Your final $sql_close; at the end won't do anything since anything after a die() call isn't executed. You shouldn't be using die() to output data anyway.
Change the die to an echo or print

Its better to use elseif statements not several ifs since you're only going to be sending one request at once, and for each request its going to go through the whole script each time, which takes more time in the long run than elseif. With elseif it'd go through only until the criteria is met.
Use elseifs
e.g.
if(this>1){
do this
} elseif (this>2) {
do this
} else
do this
}
EDIT:
Fixed up the problems with the scripts now I gotta test/make sql file...

Ho-oh 112
April 5th, 2012, 09:11 AM
UPDATES:
Fixed the PHP file and improved it to what Desbrina said
Fixed some errors with the Main script

Version: 2.0 Full


EDIT:
sql configuration table:

Table Name: trades
Column1: Code, Varchar(45)
Column2: Pokemon, Varchar(45)
Column3: Level, smallInt
Column4: Wanted, Varchar(45)
Column5: Level1, smallInt
Column6: Level2, smallInt
COlumn7: Taken, Varchar(45)

MaTe9usz6
April 5th, 2012, 10:09 AM
I don't know what I do bad, but when i call script pbStartGTS() and choose my Pokemon to trade nad press "Trade" i have an error: No pokemon chosen. This is screen for this error:

http://dl.dropbox.com/u/12173118/NoweShadows/capture032.png

Ho-oh doy you know, what i do bad?

Ho-oh 112
April 5th, 2012, 10:19 AM
I don't know what I do bad, but when i call script pbStartGTS() and choose my Pokemon to trade nad press "Trade" i have an error: No pokemon chosen. This is screen for this error:

http://dl.dropbox.com/u/12173118/NoweShadows/capture032.png

Ho-oh doy you know, what i do bad?


Did you click trade on the storage screen?

MaTe9usz6
April 5th, 2012, 10:36 AM
Yes, after click "Trade" i have this message.

Ho-oh 112
April 5th, 2012, 10:54 AM
I don't know then It works fine for me...

salva123
April 5th, 2012, 11:18 AM
and where do I have to put the php file?

overstood
April 6th, 2012, 03:04 AM
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

desbrina
April 6th, 2012, 05:58 AM
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

salva123
April 6th, 2012, 11:29 AM
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
April 7th, 2012, 07:45 AM
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
April 8th, 2012, 04:37 PM
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:

<?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...

pokemonmasteraaron
April 8th, 2012, 05:30 PM
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.

salva123
April 8th, 2012, 05:53 PM
why don't you make a video tutorial explaining how to configure all the scripts and things like that?

overstood
April 9th, 2012, 06:15 AM
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
April 9th, 2012, 04:26 PM
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.

overstood
April 10th, 2012, 01:38 AM
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
April 10th, 2012, 02:29 AM
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
April 10th, 2012, 07:52 AM
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
April 10th, 2012, 08:26 AM
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
April 11th, 2012, 04:53 AM
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
April 13th, 2012, 04:27 AM
Fixes: A lot completely new PHP file and a heavy set of testing:

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

pokemonmasteraaron
April 13th, 2012, 07:29 AM
Just wondering, if I went to the php file in internet explorer, what would be there?

Ho-oh 112
April 13th, 2012, 03:32 PM
Just wondering, if I went to the php file in internet explorer, what would be there?

"Undefined Index "Request" "

LegendTriforce
April 17th, 2012, 06:31 PM
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?

Ho-oh 112
April 18th, 2012, 05:44 AM
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.

venom12
April 18th, 2012, 05:53 AM
I have error.

Exception: RuntimeError
Message: Script error within event 7, map 113 (MAP113):
Exception: NoMethodError
Message: Section174:598:in `pbToString'undefined method `level' for #<Array:0xb54dc28>
***Full script:
pbStartGTS

Interpreter:243:in `pbExecuteScript'
PokemonGts:491:in `pbSendPokemon'
PokemonGts:287:in `pbDepositPokemon'
PokemonGts:272:in `pbPokemonGate'
PokemonGts:50:in `pbStartGTS'
PokemonGts:32:in `loop'
PokemonGts:54:in `pbStartGTS'

LegendTriforce
April 18th, 2012, 08:27 AM
yeah sure I could do that.

Thanks a bunch! Again, this script looks great. I see lots of potential~

Ho-oh 112
April 20th, 2012, 02:03 PM
Thanks a bunch! Again, this script looks great. I see lots of potential~


I first got to finish some projects I'm working on for other people first, it's almost due to be finished...

LegendTriforce
April 22nd, 2012, 08:01 PM
I first got to finish some projects I'm working on for other people first, it's almost due to be finished...

Take your time, I can wait. xD

Ho-oh 112
April 23rd, 2012, 05:18 AM
Take your time, I can wait. xD

I don't really work with rgss much lately but when I get back to it I'll make a bunch of fixes for this and a tutorial, I might even throw in a website for people to use.

pokemonmasteraaron
May 13th, 2012, 04:05 PM
just curious, is this script dead?
Like, are you finished with it?

Umbreon
May 13th, 2012, 04:44 PM
just curious, is this script dead?
Like, are you finished with it?


seems as if this is dead but I might make a patch for this seeing no-one else will.

pokemonmasteraaron
May 17th, 2012, 04:36 PM
hansiec
Oh please do!
The world of Pokémon fangames ould eternally thank you, I think.
I would anyway. lol

Umbreon
May 17th, 2012, 04:43 PM
hansiec
Oh please do!
The world of Pokémon fangames ould eternally thank you, I think.
I would anyway. lol

Right I am currently making my own game, but if I get bored I'll get to this.

Androm5da
February 23rd, 2013, 06:23 AM
Are you still active?
Nevermind, just got that error:

Exception: RuntimeError
Message: Script error within event 7, map 94 (Cynthia's Haus):
Exception: Errno::ECONNREFUSED
Message: Section031:527:in `check'Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte.
***Full script:
pbStartGTS()

Interpreter:243:in `pbExecuteScript'
Sockets:368:in `connect'
Sockets:510:in `initialize'
Sockets:586:in `new'
Sockets:586:in `pbHttpRequest'
Sockets:562:in `pbPostData'
TradeScript:517:in `pbSearchPokemon'
TradeScript:405:in `pbStartSearchGTS'
TradeScript:398:in `pbSearchListGTS'
TradeScript:340:in `loop'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600: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'
Exception: RuntimeError
Message: Script error within event 7, map 94 (Cynthia's Haus):
Exception: NoMethodError
Message: Section150:598:in `pbToString'undefined method `level' for 0:Fixnum
***Full script:
pbStartGTS()

Interpreter:243:in `pbExecuteScript'
TradeScript:491:in `pbSendPokemon'
TradeScript:287:in `pbDepositPokemon'
TradeScript:272:in `pbPokemonGate'
TradeScript:50:in `pbStartGTS'
TradeScript:32:in `loop'
TradeScript:54:in `pbStartGTS'
(eval):1:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600: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'

Jtspyder
March 3rd, 2013, 10:26 AM
Hey guys! I'm a newbie and I heard there was a trade system around that lets you trade along other players. My friend said that it works but it's not that great.

Here's the problem with me: How do you set it up? I looked through the instructions on the thread and they were not the most understanding at all.. Didn't know where to put what files and who to give when to what, just confusion everywhere! Would someone be able to assist me?

If you also can, a video tutorial would be most helpful. Thanks!

P.S I would link you to the thread but I don't have 15 post. On the bright side, it's on the first page in "Tutorial's and Resources."

rigbycwts
March 20th, 2013, 03:59 AM
This is a huge leap forward for those using Essentials.

I'll try to integrate the PHP file (from the package) to Codeigniter.

EDIT: I got an error stating: undefined method 'weight' for class 'PokeBattle_Pokemon'. I use RPG Maker XP Portable BR.

Tayuya of the Sound Four
April 5th, 2013, 11:23 PM
Unfortunately It doesnt seem like we will be seeing this particular trade system in our current verison of Essentials as it's pretty outdated and nobody has taken on the task of reviving the project..Sorry about that Rigby