Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Nass
Beginner


Joined: 16 Jan 2002
Posts: 12

PostPosted: Sun Mar 02, 2003 2:38 pm   

database scripting question
 
I have an items database made through plagiarising several other scripts I found on the web. However, it's not that good, and whereas I want it to /stat each item from vnum 1 to 1600, it will occasionally miss out some. At the moment I go into it and manually check to see which are missing, which is pretty inefficient.

Would anyone be able to point me to a few help pages or examples of scripts that actually do something like or from which I can work out how to look at collumns in the database and for a certain field, if a number is missing, add that # to some todo list or something like it?

Many thanks =)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 02, 2003 4:29 pm   
 
If your database tracks the vnums then you could use the command

#LOOPDB database-rec {commands}

You'd remember what the last vnum was, read in the current vnum and
add all the mising vnums to a string list. Once the database has
been looped through, you would figuratively:

#FORALL @MissingVnumStringList {commands /stat? to view/capture that object}

Ton Diening
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Mar 02, 2003 9:40 pm   
 
#LOOP 1,1600 {#IF %query( &vnum = %i, All) {} {#ADDI ToDoList {%i}}}

LightBulb
Advanced Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net