Using attributes in Network behavior expression editor

Hey all.

I am currently working on a game that pulls an individual table from my server based on the players ID. So, for example:

player 1 would pull from www.example.com/1.php
player 2 would pull from www.example.com/2.php
etc...

The expression editor looks like this:

"www.example.com/"..game.playerID..".php"

I've logged statements in the debugger to make sure the url is correct and it is showing up with the proper url, but for some reason the callback attribute will not change to 1 and I am getting some funky functionality. Any similar problems/solutions?

Thanks,
Matt

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited June 2018

    I know this isn't that helpful but it will at least rule out the expression editor... what happens if you remove the expression and then type in the URL directly into the behavior (that is, if you know the playerID in advance of runtime)?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • micma418micma418 Member Posts: 5

    @tatiang I have tried some playing around with it since I posted this. I just tried this and still had the same problem.

    I also pull the current time from my server, and while this was working previously, it is now returning a callback of -1. I'm very lost right now :#

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Well, at least you know it's not the expression editor. ;)

    I don't have much experience with network behaviors. I set a game up over a year ago but never got it to work beyond basic connections, end of turn, etc.

    If you haven't already gone through AppFormative's instructions, I found them helpful:

    http://www.appformative.com/implementation_gamesalad_thebasics.mox

    I don't have any connection to AppFormative but @Hopscotch is around if you have questions about their product.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.