Jump to content

Calling functions during .cfg parcing?


Recommended Posts

Situation: some part.cfg values have to be immediately processed and written to some other place depending on current values of some other variables. Then the same field is used again.

:

the variables are

arr - array of some type values

arrvalue - cfg accesible value of the same type

arrindex - cfg accesible integer

what is expected:

when arrvalue is read, it\'s copied to arr[arrindex]

example of cfg

arrindex = 0

arrvalue= 1

arrindex= 1

arrvalue= 10

arrindex= 2

arrvalue= 0

Addition note:

Of course, the real example will be much more complicated, like storing data to multiple arrays or multiple fields of objects in array. And, of course, a field, that would initialize the arrays with size according to processed value

What I tried:

Fields with set procedure

Result: Variable not found

Objects with implicit conversion (tried to use integer, string and even KSPparseable as input type)

Result: conversion functions not called, but no error message, too.

Do you have any more ideas?

Any information about how Vectors, attachRules and attach nodes are processed? There must be something similar.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...