![]() |
Client to Server string
see my problem is in clientside the string this.trade shows all the items selected , the thing is when its transfered to serverside the string automaticly trims itself ? :\ and only the first string in the set is seen.... now there are ways around this which i've already done . but why does this happen??
~Sern NPC Code: |
//#SERVERSIDE doesn't exist.
|
I'm not the best at scriting, but try putting your serverside scripting before the "//#CLIENTSIDE", considering "//#SERVERSIDE" doesn't exsist, as I use it for organization.
|
i put those there so you'd know which script is where .... lol please have alittle common sense guys
~Sern |
Quote:
|
wow your all way too litteral, and stupid for that matter. Is there a problem should i edit my post , is it that big of a deal where your gonna cry about it or explain to me why that happens. i've been scripting on graal for over 5 years im not stupid and im deff no new at this. if your really gonna keep going on about it i'll edit it so you can stop whinning about it.
HAPPY..?? gosh |
If this.string uses commas to separate indecies, you probably want to put #s(this.trade) in quotes.
|
every string uses commas to separate indecies, i added setplayerprop #c,#s(this.trade) in the clientside before the triggeraction to see if the full string would show. and it did the problem happens when it sends the string to serverside it seems to automaticly trims it and only use the first string in the list or it can only see the first string in the list for some reason... so for example:
if, this.trade = gun,sword,bombs in clientside it'll see all 3 but in serverside it only sees gun |
setplayprop is serverside?
|
yes its is
|
Quote:
To address your original problem: place quotation marks in your triggeraction around the comma-containing string. Quote:
|
i know i already fixed what was going on, i just wanted to know why it was doing that... the logic behind it hence
Quote:
|
Serer strings trim themselves for no apparent reason. Probably the fact that the character initiated in the gserver has a limited length, so it truncates anything beyond that. Try using DB-NPCs, their strings seem much longer.
For example, replace this: NPC Code:setstring serverr.asdf,1234567890; with this: NPC Code:with (getnpc(moo)) { Don't forget to read up on this. and thiso. strings/variables, as they play a role in DB-NPC interation. |
Wow, Sern is back. He used to be my personal god of scripters until i left my **** stage.
|
Quote:
------------------------------------------------------------------------ Hmm very weird why it does that.... then again tis true that graal script goes against all other scripting languages in the world lol |
All times are GMT +2. The time now is 02:20 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.