Sending and Receiving data using your own SQL Server - PHP file and TestProject included

13468916

Comments

  • scottharrrules43scottharrrules43 Tulsa, OklahomaMember, PRO Posts: 694

    @jonmulcahy, can you take a look at my php script?

  • 68kStudios68kStudios Member Posts: 219

    :'(

    Is the guide on the first post still valid? I've followed it step by step, but for me it's not working.

    I've even tried with the php example that you can find in the coockbook (https://help.gamesalad.com/hc/en-us/articles/202099666-7-10-Networking-Behaviors), but again, the callback attribute remains 0, nothing happen.

    I'm using the 0.11.0.13 version of GS and MAMP for the local server.
    thank you

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @scottharrrules43 said:
    jonmulcahy, can you take a look at my php script?

    what's wrong with the script?

    @Prisma_Comunicazione‌ what's happening? It should still work fine. check the server logs on your local server, many times you will see errors there.

  • scottharrrules43scottharrrules43 Tulsa, OklahomaMember, PRO Posts: 694

    @jonmulcahy said:

    It a script I made for sign in and register. And the register part does not work, i made it based off of this webpage. I changed everything that need to be changed I believe. http://php.about.com/od/finishedphp1/ss/php_login_code.htm

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @scottharrrules43 said:
    It a script I made for sign in and register. And the register part does not work, i made it based off of this webpage. I changed everything that need to be changed I believe. http://php.about.com/od/finishedphp1/ss/php_login_code.htm

    you are in waters I've never been in before :) I've never done any sort of registration system with PHP

    maybe if you posted your server logs something might jump out.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    @jonmulcahy

    Only just caught this: terrific stuff, Jon; I'm mightily impressed. I've "Awesomed" your first post of this thread. :smile:

    (It's all a bit beyond my "old-fashioned" brain tho'... :wink: )

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @gyroscope said:
    jonmulcahy

    Only just caught this: terrific stuff, Jon; I'm mightily impressed. I've "Awesomed" your first post of this thread. :smile:

    (It's all a bit beyond my "old-fashioned" brain tho'... :wink: )

    thanks! it was a lot of fun figuring out. have not really touched it since then though :) I have plans for it in my new game, but I have not quite hit that point yet.

  • dylanwoodylanwoo Member Posts: 25

    I'm right there with this - does anyone have a sample of the get working on a really simple file?

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @dylanwoo i have a sample project and php file in the first post

  • dylanwoodylanwoo Member Posts: 25

    Thanks Jon - I saw my problem - I was using the wrong file and the JSON structure was different! Thanks!

  • dylanwoodylanwoo Member Posts: 25

    I had grabbed the wrong php for the project I downloaded.

  • colandercolander Member Posts: 1,610

    @jonmulcahy I forgot to awesome your op done now. Great work :)

  • 68kStudios68kStudios Member Posts: 219
    edited June 2014

    @jonmulcahy‌ mmm...nothing happens, GS don't send or get anything. If you say that it should still works, I'll try again. Thank you.

  • colandercolander Member Posts: 1,610

    @Prisma_Comunicazione it definitely works, I and many others have got it going. It is not easy and any little mistake will stop it from running and it won't tell you where you went wrong you just have to keep going over it until you find it. I read the whole thread and posted some of the issues I had and fixes I found for my scripts.

  • 68kStudios68kStudios Member Posts: 219

    ok, I'll start again from the beginning. thank you ;)

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    Look at the apache / php logs , they are invaluable in troubleshooting

  • 68kStudios68kStudios Member Posts: 219

    Ok, i've found what's wrong (some error on the php editing) and now it works (more or less).

    But...this is really the only way to use the network behavior with GS? Is impossible to store data in a txt file or something like that, without a mysql database? I mean, something simpler?

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @Prisma_Comunicazione‌

    you can do whatever you want with it, that's the beauty of your own server. You are stuck with whatever GS sends out, but any sort of manipulation / storage process you can think of should work as long as you know how to code it.

  • 68kStudios68kStudios Member Posts: 219

    someone tried (and succeeded) to do something with the php example from the cookbook?

  • dylanwoodylanwoo Member Posts: 25

    As someone who understood the php side right away - I'd love to understand more the game saladside and if there was a way for the tables in memory to be viewed in the debugger - etc.

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989

    @dylanwoo said:
    As someone who understood the php side right away - I'd love to understand more the game saladside and if there was a way for the tables in memory to be viewed in the debugger - etc.

    You can make a scene that lets you preview a table in game for debugging. I made a free template tool called GS Tableizer, essentially it spawns a grid of actors and each one displays the appropriate table cell data... it also lets you scroll vertically and horizontally. Damn handy when tackling any multiplayer or table based stuff.

  • 68kStudios68kStudios Member Posts: 219

    I've managed to do a simple send/get table, writing it in a txt file. Everything is on my web site server, so nothing special...but it works.

    I think that can use this system to update some file on my app (items, texts and other things)...

  • NeovampNeovamp Member, PRO Posts: 6

    The GS file is actually empty when i download it. Is there another link to get it ?

  • colandercolander Member Posts: 1,610

    @Neovamp I just downloaded the project and it loaded in NB254

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @Neovamp said:
    The GS file is actually empty when i download it. Is there another link to get it ?

    how are you downloading it? It's a zip file and still downloads fine.

  • NeovampNeovamp Member, PRO Posts: 6

    With chrome. When i unzip it i just have .xml files and a test.gsproj which weighs 0ko

  • NeovampNeovamp Member, PRO Posts: 6

    Ok my bad i just had to rename the ext's folder with .gameproj

  • 3DMA3DMA Member, PRO Posts: 162
    edited July 2014

    I just wanted to say thank you. Thanks to your "inspiration" and based on the tut i created an Utilities App with Gamesalad like 5 times faster than i would do in Xcode. The App itself is in it's final steps and currently running QA and LQA Tests. But it's gona be released soon. Thanx a lot again.

    I used your concept to make some kind of mobile Dashboard for various Online Services and even realized an Mobile Admin for OpenCart Online Shops... but the same princip can be used for any CMS... or anything where Databases are involved. It has currently 5 PHP Scripts that parse and combine 15 JSON sources.... and send them as a table to the app, depending on what is needet. Would someone be interested in a complete ready to use project like this?

    P.S.: The whole project works in 5 Languages ;-)

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @3DMA‌
    awesome! I'd love to see a video or screenshots of how it works

  • 3DMA3DMA Member, PRO Posts: 162
    edited July 2014

    @jonmulcahy‌
    Here you can see one of them nearly done. http://forums.gamesalad.com/discussion/70696/my-new-app

    Unfortunately I'm not progressing as fast as i wanted to, as i am still designing a lot for my racing game. So just a little bit more patience ;-)

Sign In or Register to comment.