Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 09-28-2005, 01:17 AM
Silent Silent is offline
<3
Silent's Avatar
Join Date: Mar 2005
Location: England
Posts: 132
Silent is on a distinguished road
Send a message via AIM to Silent Send a message via MSN to Silent
I've come across a probably related issue.

I have a database NPC reading and changing a value in a multidimensional array every 2 seconds:
PHP Code:
function onTimeout() {
  for (
temp.ithis.guilds_pending) {
    if (
temp.i[2] > 0temp.i[2] -= 2;
    
chat this.guilds_pending[0][2];
  }
  
setTimer(2);

(I also used the for (i=0; etc. method for this, results were no different)

Watching it on player, it appears to be working absolutely fine. But when I view the NPC's flags, the value is recorded at 431990. The original number was 432000. On my Graal client, it's gone all the way down to 430914 now.

When I click Send on the script editing window (without changing anything), the number continues counting down as it should, but the stored value is still 431990.

I disable the entire script, and add:
PHP Code:
function onCreated() {
  
message(this.guilds_pending[0][2]);

It says the correct number (below 430914), but the flags still show it as 431990.


After an npcserver restart, the number produced by the message() is 431990.
The value isn't being saved perminantly. -_-;

Edit: Fixed a typo.
__________________
Quote:
Originally Posted by MilkyWay0016
The Bible also says things like...

"Stone disobedient children" (Deuteronomy 21:18-21)
Quote:
Originally Posted by Loriel
Disobedient children are likely enough to get stoned already, I think.

Last edited by Silent; 09-28-2005 at 05:52 PM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:54 PM.


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