![]() |
Passing Objects
How can you pass an object from clientside to serverside and serverside to client?
IE: hotel.test=wow hotel.test2=wow2 hotel.test3=wow3 How could I send the hotel object to serverside aswell as clientside :p |
I do not think there is a way as of yet.. perhaps try setting it to an attribute? ie:
NPC Code: |
Quote:
|
There is no way to pass them via triggeractions, but I did come up with a little way to avoid that.
To send it: PHP Code:
PHP Code:
|
Quote:
|
Quote:
temp.array = { "foo.bar.baz = 10" }; temp.obj.loadvarsfromarray(temp.array); if it will load the temp.foo.bar.baz or not. If it does function that way, it wouldn't be hard to modify my code to support multiple-levels. |
Quote:
|
Quote:
|
I didn't bother to read anything, so I'm just throwing in some (hopefully) related information.
On my server, I reserve attr[2] to attr[5] of every NPC for specific things. attr[4] is the NPC's identifier; it's a value based on the NPC's index. If I want to refer the serverside to a specific NPC found on the clientside, it uses this to figure out which NPC I want. It's basically a way for me to pass a reference to this NPC from the clientside to the serverside, or vice-versa. |
Why dont you guys just use the inbuilt save[] functions..?
|
Quote:
|
Ah sorries, didnt read everything :p
|
Quote:
HTML Code:
temp.object = new TStaticVar();HTML Code:
scriptlogmissingfunctions=false,timeout=0,joinedclasses=,test=test,test.bar=test2 |
Quote:
|
| All times are GMT +2. The time now is 03:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.