Why Would I Do This?

Post » Sun Aug 08, 2010 4:12 pm

Hey folks,

For what reason would I put a reference variable name in quotes, as in : "SomethingREF".yada, as opposed to just SomethingREF.yada, without the quotes?

Thanks!
HerrBaron
User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Post » Sun Aug 08, 2010 11:00 am

I have no idea why you would do that, I've never done it. It wouldn't surprise me if it it doesn't even work. :P
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Sun Aug 08, 2010 5:07 pm

I have no idea why you would do that, I've never done it. It wouldn't surprise me if it it doesn't even work. :P


Actually, it does work; as an example, the BlackWolf Backpack vendor replenish mod uses it, and I've run across it before. Just not sure why someone would use that notation. :blink:

Best,
-HB
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Sun Aug 08, 2010 10:12 pm

It feels kind of ironic having someone who signs their posts ask why someone would do something unnecessary.
User avatar
sas
 
Posts: 3435
Joined: Thu Aug 03, 2006 8:40 am

Post » Sun Aug 08, 2010 11:08 am

It feels kind of ironic having someone who signs their posts ask why someone would do something unnecessary.


:biggrin: Hey, TT! Just thought perhaps it was some obscure characteristic of the engine that maybe caused it to deal differently with quoted refs... one doesn't know unless one asks, right? :wink_smile:

By the way, I've enjoyed your mods since Oblivion days; thanks for them!

-HB
User avatar
Brandon Bernardi
 
Posts: 3481
Joined: Tue Sep 25, 2007 9:06 am

Post » Sun Aug 08, 2010 6:51 pm

The only need for quotes I've found is that if you're trying to refer to a reference via its FormID number rather than the editor ID, you'll get a compile error for any FormID that begins with a number unless you put it in quotes.
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Sun Aug 08, 2010 10:46 am

The only need for quotes I've found is that if you're trying to refer to a reference via its FormID number rather than the editor ID, you'll get a compile error for any FormID that begins with a number unless you put it in quotes.


Ah-hah! So there IS a use for it; many thanks! Appreciate it, Imp!

-HB
User avatar
Rob Smith
 
Posts: 3424
Joined: Wed Oct 03, 2007 5:30 pm

Post » Sun Aug 08, 2010 9:17 am

Ah-hah! So there IS a use for it; many thanks! Appreciate it, Imp!

-HB

But you should make it common practice to NOT used IDs that start with numbers. Do that and the need for quotes is moot and nothing has changed about how scripts work. Overall nothing is lost and only stability and ease of understanding is gained.
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Sun Aug 08, 2010 11:49 am

It feels kind of ironic having someone who signs their posts ask why someone would do something unnecessary.


:rofl:
User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Post » Sun Aug 08, 2010 10:08 pm

But you should make it common practice to NOT used IDs that start with numbers. Do that and the need for quotes is moot and nothing has changed about how scripts work. Overall nothing is lost and only stability and ease of understanding is gained.


I was talking about form IDs, the hex numbers the GECK assigns, rather than editor IDs, the ID you assign yourself. Some of the things placed by the developers into the game world were given ref names that you can use to refer to them in scripts, but a lot of them are unnamed, so you have to refer to them via the form ID (or give the ref a name, but that could potentially conflict with another mod.) But yeah, that is good advice.
User avatar
Queen of Spades
 
Posts: 3383
Joined: Fri Dec 08, 2006 12:06 pm


Return to Fallout: New Vegas