Thanks @Manto ! I had the table as 'datatest' instead of 'testdata' stupid mistake on my behalf, but its working just fine now! Also, how do I change the Send/Recieve URL to change it from local host to an online server?
@Shenanigans Studio said:
Thanks @Manto ! I had the table as 'datatest' instead of 'testdata' stupid mistake on my behalf, but its working just fine now! Also, how do I change the Send/Recieve URL to change it from local host to an online server?
Great!
You need to host it somewhere. Do you happen to have a Web server (website)? As far as I know many of those have support for php, so you could upload the file there.
If you don't have a web server that has php support, you might want to take a look at heroku, it's free for small use.
@Shenanigans Studio said: @jonmulcahy Just made an account with them! I was able to make a database through site5 too, but how do I come up with the URL?
If you put it in the public_html folder it'll just be domain.com/file.php
@Shenanigans Studio said: @jonmulcahy Just made an account with them! I was able to make a database through site5 too, but how do I come up with the URL?
If you put it in the public_html folder it'll just be domain.com/file.php
If it's in a sub folder, you add that to the url
Thats the send/recieve URL? I put it in the folder and put in the link and im getting a "0" callback
@Shenanigans Studio said: @jonmulcahy Just made an account with them! I was able to make a database through site5 too, but how do I come up with the URL?
If you put it in the public_html folder it'll just be domain.com/file.php
If it's in a sub folder, you add that to the url
Thats the send/recieve URL? I put it in the folder and put in the link and im getting a "0" callback
yea, but you need to replace domain.com with the domain you registered.
@jonmulcahy
I got this when I tried viewing it via the link in my files database if it helps at all
Edit: Fixed it! I uploaded the .php via the "upload" button instead of doing an FTP upload. My gs project now returns a negative 1 callback, which Im sure I can handle myself. hopefully lol
Thanks Jon and Manto you guys were a huge help!
@Shenanigans Studio said: @jonmulcahy I tried debugging this one on my own I really did, but im going insane here. Im getting these errors:
PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 78
[01-Jul-2016 02:00:47 UTC] PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 80
However these lines are in the exact same format as the other lines 75-85.
You have some strange characters in your $value. ASCII 11 seems to mean vertical tab. Where does the $value string come from? Is it something you've set in the php file?
@Shenanigans Studio said: @jonmulcahy I tried debugging this one on my own I really did, but im going insane here. Im getting these errors:
PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 78
[01-Jul-2016 02:00:47 UTC] PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 80
However these lines are in the exact same format as the other lines 75-85.
You have some strange characters in your $value. ASCII 11 seems to mean vertical tab. Where does the $value string come from? Is it something you've set in the php file?
@Shenanigans Studio said: @jonmulcahy I tried debugging this one on my own I really did, but im going insane here. Im getting these errors:
PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 78
[01-Jul-2016 02:00:47 UTC] PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 80
However these lines are in the exact same format as the other lines 75-85.
You have some strange characters in your $value. ASCII 11 seems to mean vertical tab. Where does the $value string come from? Is it something you've set in the php file?
What he said
Thanks guys! I went and checked my vertical tabs and the two problem values were in columns 44 and the rest were in 4, I accidently did a soft return instead of a hard return. So now the errors are gone but now Im getting a 0 callback with no errorlogs. I checked forgedhero.com/leaderboard.php and I get "Error: Could not connect to MySQL server!"
@Shenanigans Studio said: @jonmulcahy I tried debugging this one on my own I really did, but im going insane here. Im getting these errors:
PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 78
[01-Jul-2016 02:00:47 UTC] PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 80
However these lines are in the exact same format as the other lines 75-85.
You have some strange characters in your $value. ASCII 11 seems to mean vertical tab. Where does the $value string come from? Is it something you've set in the php file?
What he said
Thanks guys! I went and checked my vertical tabs and the two problem values were in columns 44 and the rest were in 4, I accidently did a soft return instead of a hard return. So now the errors are gone but now Im getting a 0 callback with no errorlogs. I checked forgedhero.com/leaderboard.php and I get "Error: Could not connect to MySQL server!"
I'm guessing the either the name of the database or the login information is wrong. Should be at the top of the file.
@jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
@Shenanigans Studio said: @jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
Yes your link is bad. Db should be fordhed_leaderboard, and the username will be something like forged_username. In phony admin you can create an account of you haven't already
@Shenanigans Studio said: @jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
Yes your link is bad. Db should be fordhed_leaderboard, and the username will be something like forged_username. In phony admin you can create an account of you haven't already
@jonmulcahy Is this the "phony admin" username and password you were referring to? I put this in the
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'forgedhe_wp217', '*********')
still not working.
Is ":/Applications/MAMP/tmp/mysql/mysql.sock" the issue perhaps? Im not sure where this path comes from to be honest.
@Shenanigans Studio said: @jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
Yes your link is bad. Db should be fordhed_leaderboard, and the username will be something like forged_username. In phony admin you can create an account of you haven't already
@jonmulcahy Is this the "phony admin" username and password you were referring to? I put this in the
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'forgedhe_wp217', '*********')
still not working.
Is ":/Applications/MAMP/tmp/mysql/mysql.sock" the issue perhaps? Im not sure where this path comes from to be honest.
Yes, that's likely the problem. You should find the URL for the database on your hosting site. Probably in the remote tab.
@Shenanigans Studio said: @jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
Yes your link is bad. Db should be fordhed_leaderboard, and the username will be something like forged_username. In phony admin you can create an account of you haven't already
@jonmulcahy Is this the "phony admin" username and password you were referring to? I put this in the
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'forgedhe_wp217', '*********')
still not working.
Is ":/Applications/MAMP/tmp/mysql/mysql.sock" the issue perhaps? Im not sure where this path comes from to be honest.
Yes, that's likely the problem. You should find the URL for the database on your hosting site.
yea, that is exactly the problem. You're passing in the local path of your mysql database, but your website is online. try changing it to localhost, thats what I have
@jonmulcahy@Manto thanks guys! Changed the path to my IP that i found in the remote tab and Im able to access the database. Im now getting a positive 1 callback when im testing, but the table doesnt send or recieve. I know I found the error log in my MAMP folder when testing locally but where can I find it now that my database is online?
if it's something that the script is outputting, it should be in the same directory as your php file. otherwise in your cpanel on site5 there should be a logs section
Found the log and sending and getting data is fully operational, thank you so much jon and manto for being patient with me. I promise Ill leave you guys alone for atleast a few days. you guys are gods!
@Shenanigans Studio said:
Found the log and sending and getting data is fully operational, thank you so much jon and manto for being patient with me. I promise Ill leave you guys alone for atleast a few days. you guys are gods!
lets say a new character starts the game on an island, with just a homebase and a bit of gold. And here you will be given a completely empty personal database for the placement data of all your future buildings.
When you place a new building at a certain location X,Y on the map/scene, That buildings' coordinates and object index number will then be saved to that personal table owned by that players unique player ID.
Then the map could be visited by other online players. And all of the map's object data, ( X,Y and index number), would then be retrieved from that visited players unique table. That could be found through the players unique player ID
TLDR; I want to somehow use the "One-to-many" table method, to make a personal table for each unique player ID.
Or should i just make a massive second table for every unique ID's placement data?
I just want my map to be visited by other players. There must be a way to somehow save every object placement data onto a table. And when visited, the visitor would get the object placement data from the visited table.
@build said:
lets say a new character starts the game on an island, with just a homebase and a bit of gold. And here you will be given a completely empty personal database for the placement data of all your future buildings.
When you place a new building at a certain location X,Y on the map/scene, That buildings' coordinates and object index number will then be saved to that personal table owned by that players unique player ID.
Then the map could be visited by other online players. And all of the map's object data, ( X,Y and index number), would then be retrieved from that visited players unique table. That could be found through the players unique player ID
TLDR; I want to somehow use the "One-to-many" table method, to make a personal table for each unique player ID.
Or should i just make a massive second table for every unique ID's placement data?
I just want my map to be visited by other players. There must be a way to somehow save every object placement data onto a table. And when visited, the visitor would get the object placement data from the visited table.
(sorry for bad gramma)
I would probably do a single table with everyone's stuff sorted by a unique GUid. I don't think it would work otherwise, I think you need an existing table to download to
Yes you can only get large tables with importing CSV files. I have a 200 x 3 table in one and I cannot see any rows past like 50 or something, but it still works I just have to open the file separately to see what's there...
Comments
Thanks @Manto ! I had the table as 'datatest' instead of 'testdata' stupid mistake on my behalf, but its working just fine now! Also, how do I change the Send/Recieve URL to change it from local host to an online server?
Great!
You need to host it somewhere. Do you happen to have a Web server (website)? As far as I know many of those have support for php, so you could upload the file there.
If you don't have a web server that has php support, you might want to take a look at heroku, it's free for small use.
I use site5, been using them for years
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy Just made an account with them! I was able to make a database through site5 too, but how do I come up with the URL?
If you put it in the public_html folder it'll just be domain.com/file.php
If it's in a sub folder, you add that to the url
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Thats the send/recieve URL? I put it in the folder and put in the link and im getting a "0" callback
yea, but you need to replace domain.com with the domain you registered.
for example, lets say I have http://www.awesomegame.com
and when I FTP up my file, I put it in \public_html\async.php
I would use http://www.awesomegame.com/async.php as the URL.
If I put the file in \public_html\sync, the URL would be http://www.awesomegame.com/sync/async.php
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
This is where I have my file. My domain name: "www.forgedhero.com" So I have "http://www.forgedhero.com/leaderboard.php" Anything wrong with this that you can see?
I see now I had in the subfolder "wp-includes", but I moved it to the main folder and still no success
I get a 404, file not found, error when I try to browse to the file here: http://www.forgedhero.com/leaderboard.php
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy
I got this when I tried viewing it via the link in my files database if it helps at all
Edit: Fixed it! I uploaded the .php via the "upload" button instead of doing an FTP upload. My gs project now returns a negative 1 callback, which Im sure I can handle myself. hopefully lol
Thanks Jon and Manto you guys were a huge help!
@jonmulcahy I tried debugging this one on my own I really did, but im going insane here. Im getting these errors:
PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 78
[01-Jul-2016 02:00:47 UTC] PHP Warning: Unexpected character in input: '
' (ASCII=11) state=0 in C:\MAMP\bin\mamp\leaderboard.php on line 80
However these lines are in the exact same format as the other lines 75-85.
You have some strange characters in your $value. ASCII 11 seems to mean vertical tab. Where does the $value string come from? Is it something you've set in the php file?
What he said
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Thanks guys! I went and checked my vertical tabs and the two problem values were in columns 44 and the rest were in 4, I accidently did a soft return instead of a hard return. So now the errors are gone but now Im getting a 0 callback with no errorlogs. I checked forgedhero.com/leaderboard.php and I get "Error: Could not connect to MySQL server!"
I'm guessing the either the name of the database or the login information is wrong. Should be at the top of the file.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy that was my first thought too, but everything looks good on that end. Am i getting all the details from the right place? Or is it my $link that needs editing? I never changed it.
Yes your link is bad. Db should be fordhed_leaderboard, and the username will be something like forged_username. In phony admin you can create an account of you haven't already
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy Is this the "phony admin" username and password you were referring to? I put this in the
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'forgedhe_wp217', '*********')
still not working.
Is ":/Applications/MAMP/tmp/mysql/mysql.sock" the issue perhaps? Im not sure where this path comes from to be honest.
Yes, that's likely the problem. You should find the URL for the database on your hosting site. Probably in the remote tab.
yea, that is exactly the problem. You're passing in the local path of your mysql database, but your website is online. try changing it to localhost, thats what I have
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy @Manto thanks guys! Changed the path to my IP that i found in the remote tab and Im able to access the database. Im now getting a positive 1 callback when im testing, but the table doesnt send or recieve. I know I found the error log in my MAMP folder when testing locally but where can I find it now that my database is online?
if it's something that the script is outputting, it should be in the same directory as your php file. otherwise in your cpanel on site5 there should be a logs section
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Found the log and sending and getting data is fully operational, thank you so much jon and manto for being patient with me. I promise Ill leave you guys alone for atleast a few days. you guys are gods!
-cheers
no problem, have fun with it!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
lets say a new character starts the game on an island, with just a homebase and a bit of gold. And here you will be given a completely empty personal database for the placement data of all your future buildings.
When you place a new building at a certain location X,Y on the map/scene, That buildings' coordinates and object index number will then be saved to that personal table owned by that players unique player ID.
Then the map could be visited by other online players. And all of the map's object data, ( X,Y and index number), would then be retrieved from that visited players unique table. That could be found through the players unique player ID
TLDR; I want to somehow use the "One-to-many" table method, to make a personal table for each unique player ID.
Or should i just make a massive second table for every unique ID's placement data?
I just want my map to be visited by other players. There must be a way to somehow save every object placement data onto a table. And when visited, the visitor would get the object placement data from the visited table.
(sorry for bad gramma)
I would probably do a single table with everyone's stuff sorted by a unique GUid. I don't think it would work otherwise, I think you need an existing table to download to
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Then what if a player had more than 100 buildings?
I mean the tables in gamesalad maxes out at 100 rows.
And how do i call the ID specific placement data from a table with thousands of IDs?
Im also not quite sure how to add multiple table values to the .php file.
These are the only problems stopping me from creating my game.
Execpt for the bugged custom collisions, but thats another topic
I have tables with 999 rows and 999 columns. Maybe you have to import to get above he limit? It's been awhile since I've looked. I also use a Mac
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Yes you can only get large tables with importing CSV files. I have a 200 x 3 table in one and I cannot see any rows past like 50 or something, but it still works I just have to open the file separately to see what's there...