Official ScriptUO EasyUO Scripts > Scripting Chat

NameSpace Question: Maintaining namespace integrity with many:many relationship.

<< < (3/3)

lydaan:

--- Quote ---You mentioned you want to preserve the %# variables (%0, %1, %2, ... %n), and do this with namespaces.

The prefix for namespace variables is ! (not %). So those sub parameters will not be preserved via namespaces.
--- End quote ---

I've already done this (as I explained in the same post). I was just showing what I was doing before, for anyone else who might find this thread at a later time. I often scroll through threads from years ago to see if a previous discussion involves something I'm working on.


--- Quote ---I do not use deletevar because the documentation declares it deprecated, however, have you tested:

--- Code: easyuo ---deletevar % . local_ca . %i
--- End quote ---

yep. I've tried just about everything I can think of. the only thing I haven't tried yet is a %deletevar . %i as a string reference of the variable name, but I don't really care at this moment as it is no longer relevant. I'll do a full test later and do a write-up once I'm satisfied I've exhausted all options.

The wiki says "considered deprecated," not exactly deprecated and I would assume the spotty concatenation issue is due to it not being updated once "set %variable   ," was implemented.

The main reason why I prefer to use deletevar is because it supposedly deletes the address, or at least when you reference the address it returns "N/A," mimicking an undefined address. Conversely you could set %variable N/A, and I do this for persistent variables like #result, but my goal is to not populate anything that doesn't need to be. But that's me.

"set %variable  ," returns a value of " ," and if want to check against that you have to set another check variable, like %null to the same value to check against it.

Example:

--- Code: easyuo ---set %variableif %variable =    ;how do I check for this???? ;you must set a checkVar to the same valueset %nullif %variable = %null ;now you can check against %null
like in most situations there are many ways to solve this, but it comes down to personal preference.

Navigation

[0] Message Index

[*] Previous page

Go to full version