Author Topic: SPRINT and #integer  (Read 2264 times)

Offline aigleborgne

  • Planewalker
  • *****
  • Posts: 106
SPRINT and #integer
« on: October 10, 2010, 02:04:48 AM »
Hello,

I'm trying to store a reference string in a variable.

This line works:
Code: [Select]
SPRINT description #25217
Now, I use a variable for reference index, I tried:
Code: [Select]
SPRINT EVALUATE_BUFFER label #%label_strref%
SPRINT EVALUATE_BUFFER label ~#%label_strref%~
SPRINT label #%label_strref%
SPRINT label ~#%label_strref%~
None work...

Purpose of this : export all kits
Full code:
Code: [Select]
COPY_EXISTING ~kitlist.2da~ ~override~
    COUNT_2DA_ROWS ~9~ kit_rows
    FOR ( kit_index = 1 ; kit_index < kit_rows ; kit_index += 1 ) BEGIN
        READ_2DA_ENTRY %kit_index% 0 9 id
        READ_2DA_ENTRY %kit_index% 1 9 name
        READ_2DA_ENTRY %kit_index% 3 9 label_strref
        READ_2DA_ENTRY %kit_index% 4 9 description_strref
        READ_2DA_ENTRY %kit_index% 5 9 abilities
        READ_2DA_ENTRY %kit_index% 8 9 class_id
        //SPRINT EVALUATE_BUFFER label #%label_strref%
        SPRINT label ~#%label_strref%~
        SPRINT description #25217
        SPRINT ~list5~ ~%list5%[ID]:%id%%nl%~
        SPRINT ~list5~ ~%list5%[NAME]:%name%%nl%~
        SPRINT ~list5~ ~%list5%[LABEL]:%label%%nl%~
        SPRINT ~list5~ ~%list5%[ABILITIES]:%abilities%%nl%~
        SPRINT ~list5~ ~%list5%[CLASS]:%class_id%%nl%~
        SPRINT ~list5~ ~%list5%[DESCRIPTION]:%description%%nl%~
    END
BUT_ONLY_IF_IT_CHANGES

Is is possible or I am forced to use command line to extract strref ?

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: SPRINT and #integer
« Reply #1 on: October 10, 2010, 02:27:15 AM »
READ_2DA_ENTRY %kit_index% 3 9 label_strref
READ_2DA_ENTRY %kit_index% 4 9 description_strref

GET_STRREF label_strref label
GET_STRREF description_strref description

Offline aigleborgne

  • Planewalker
  • *****
  • Posts: 106
Re: SPRINT and #integer
« Reply #2 on: October 10, 2010, 04:10:17 AM »
Thanks, it works like a charm.
I probably missed something as GET_STRREF in not in WEIDU documentation :)


READ_2DA_ENTRY %kit_index% 3 9 label_strref
READ_2DA_ENTRY %kit_index% 4 9 description_strref

GET_STRREF label_strref label
GET_STRREF description_strref description


Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: SPRINT and #integer
« Reply #3 on: October 10, 2010, 06:53:11 AM »
you need to pay $150 for a premium membership before you can ask new features in WeiDU.

GET_STRREF is documented in my local copy of the WeiDU readme, but apparently it was added after the last official release.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: