Aller au contenu

Photo

Problem with interger's and object's names


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
el.sombrero

el.sombrero
  • Members
  • 100 messages
 Hi guys,

 I'm using a simple script to open doors... but noticed that if the object name has doubled characters like "L1 1A" (double 1) or if the name has dots in the middle of it (L1.1A) trigger to oen it wont work.  Also, I noticed that the toolset automatically converts CAPS character to small ones, at least in scripts names.
 My question is the following... which other characteristics of the toolset, concerning the naming of objects and intergers, should I be aware of? I just noticed that I lost a huge amount of time due to wrong naming of objects... should I consider the same rulez apply to intergers naming?

thx!

#2
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
I recall having issues once with waypoints that had a dash "-" character in them. My guess is that some of the routines that are used to access objects may not be handling symbols correctly in all cases. So dashes, periods, and spaces may be problematic when used as tags or object names. (I suspect it is the space in your "L1 1A" that is the cause of your problem, not the repeated 1.)

I've also read somewhere that tag names should be shorter than 32 characters.

I am not aware of any issues regarding variable names (strings, integers, or whatever) other than that campaign variable names should be shorter than (I think I read somewhere) 32 characters.

Regards

#3
Morbane

Morbane
  • Members
  • 1 883 messages
name_all_variables_like_this  (no capitals - the underlines separate the words)

OrLikeThis (no spaces - the capitals separate the words)

as well as script names or anything else for that matter and always the same tecnhique it is easier in the long run to type them out or to remember them later

for the actual display names regular Capitals and spaces are allowed

Modifié par Morbane, 13 juin 2012 - 06:47 .