Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Clientside script update problem (https://forums.graalonline.com/forums/showthread.php?t=62805)

Rick 12-16-2005 10:42 AM

Clientside script update problem
 
CheeToS said he would post a thread about this, but he apparently didn't.

With the current revision of Graal4 (or the NPC server...?), when updating scripts (classes at least...) on a server, the clientside script is basically removed/disabled. I tested this with a basic script:

HTML Code:

function onCreated()
{
  this.attr[2] = 0;
  this.setTimer(0.1);
}

function onTimeout()
{
  this.attr[2] = this.attr[2] + 1; // this.attr[2]++ seems to be broken.
  this.setTimer(0.1);
}

//#CLIENTSIDE
function onCreated()
{
  this.setTimer(0.05);
}

function onTimeout()
{
  this.message(this.attr[2]);
  this.setTimer(0.05);
}

(Yes, I know the script sucks...)

My theory is that it's related to the recent setbackto gani fix, but I'm probably wrong.

It'd be nice if you could get this fixed quickly. :)

[edit]

This only occurs for NPCs that the client already knows about. If I say, reset a DB-NPC, then warp it back into a level with the player, the player sees the new clientside script just fine.

Admins 12-16-2005 03:03 PM

Can you explain it a little bit more, what exactly is broken when the script is updated? Only when updating classes? I could imagine that a sleep-call is stopped but everything else should work fine. There is a little problem with v2 compatibility so that it sends the old script code to the clients if there are several people in the room, once all players have v4 I will disable that behaviour.

Rick 12-17-2005 12:02 AM

Quote:

Originally Posted by Stefan
Can you explain it a little bit more, what exactly is broken when the script is updated? Only when updating classes? I could imagine that a sleep-call is stopped but everything else should work fine. There is a little problem with v2 compatibility so that it sends the old script code to the clients if there are several people in the room, once all players have v4 I will disable that behaviour.

Seems to occur with DB-NPCs too.

What's broken : clientside scripts "dissapear" when an update to the NPCs script is sent. This is for existing NPCs the client already knows about. It is enough to open a DB-NPCs' script and click Send to break any clientside script in that DB-NPC or class. Havn't tested weapons yet.

CheeToS2 12-17-2005 01:10 AM

I have had issues too, with clientside level npcs and weapon scripts. I've tried reproducing the problems but I haven't been able to yet :/

Admins 12-17-2005 02:18 AM

Well even gani scripts are updated and sent to the client immediatilly when uploading a new gani, the same for weapons, npcs and classes. The only thing that should break is new scripting code when there are several people watching the npc.

Rick 12-17-2005 03:01 AM

Quote:

Originally Posted by Stefan
Well even gani scripts are updated and sent to the client immediatilly when uploading a new gani, the same for weapons, npcs and classes. The only thing that should break is new scripting code when there are several people watching the npc.

Well it's broken now for clientside scripts in DB-NPCs/classes at least.

Admins 12-17-2005 04:57 PM

I have not experienced any of such problems, would be good to give level name / script name or similar

Rick 12-18-2005 12:38 AM

Quote:

Originally Posted by Stefan
I have not experienced any of such problems, would be good to give level name / script name or similar

Server "Edge", DB-NPC "Test-NPC". Go to onlinestartlocal.graal, you'll see the numbers going up. Open the script and send (update) it. Note how the numbers have stopped, reconnect, numbers are working again.

Admins 12-18-2005 06:09 AM

Well its exactly like i said, when updating the script it is sending the update in old scripting to be compatible to all clients that are possibly staying in the same level (and there is no onTimeout thing in old scripting engine)

Rick 12-18-2005 07:34 AM

Quote:

Originally Posted by Stefan
Well its exactly like i said, when updating the script it is sending the update in old scripting to be compatible to all clients that are possibly staying in the same level (and there is no onTimeout thing in old scripting engine)

Well, can you add a toggle to disable that?

Edge is v4 only.

Maniaman 12-22-2005 10:19 PM

I am having this problem on Maloria. They work fine the first time the client sees them, but they stop updating/break when the level is updated. This is with the old scripting engine.

Lance 12-22-2005 10:27 PM

Quote:

Originally Posted by Maniaman
I am having this problem on Maloria. They work fine the first time the client sees them, but they stop updating/break when the level is updated. This is with the old scripting engine.

There is a related bug that wipes the players[] array when a gmap part level is uploaded/updated. Could this be causing the problem you're having?

Maniaman 12-22-2005 10:30 PM

It is happening in levels that are not parts of gmaps.


All times are GMT +2. The time now is 04:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.