View Single Post
  #1  
Old 08-18-2012, 02:40 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Larger Char Limit for NPC Attr Synchronisation

Lets say I want to pass a reasonably large list of accounts from serverside to clientside within an NPC. For the sake of an example, I'll get myself 25 players at random:

PHP Code:
temp.query "SELECT account FROM someTableName ORDER BY RANDOM() LIMIT 25"
Now for the test NPC:

PHP Code:
function onCreated(){
  
temp.= {"BlackWolf777","Stowen","klyde15","Graal701660","pc:2608035","Graal801344","spydrct02","gregg","Graal782353","Graal750717","spider2","fleshkiller","pc:5638487","Graal761819","Graal801051","Graal761488","Graal793756","Nubeh","RaidenRekon","pc:5611346","pc:4327182","Graal823841","Graal695712","Graal714610","Graal770881"};
  
this.attr[1] = @temp.a;
  echo(
this.attr[1].length());
}

//#CLIENTSIDE
function onCreated(){
  echo(
this.attr[1]);
  echo(
this.attr[1].length());

On the serverside, this is echo'ing a length of 269 characters.
On the clientside however, the last 4 intended entries of the list are cut off, a length of 223 is echo'd.

While I do not have any scripts crossing the limit at this particular point in time, it is a concerning possibility for the future, I would suggest that not being able to pass more than 21 randomised accounts is too restrictive. It would be nice if this was just a default limit as a pre-caution, and there was a variable to adjust the limit similarly to the loop limit.

I'm sure they would benefit from this on iPhone!
Reply With Quote