Is there a character limit to variables?

Post » Fri May 27, 2011 3:46 pm

I had an odd problem with a script that was causing a CTD the moment it tried to set a global variable. It was a very simple day timer script, tried tested and true in hundreds of applications, so I knew that wasn't the problem. The variable had a very long name, so I shortened the name of the variable, and now the script works fine! So I'm wondering if there's a character limit to variables, and what is the limit?

And yet, here's the weird thing. I have a global variable that's 22 characters long, and the scripts that set it have been running fine. The one that was causing the problem was only 18 characters long. The variable was set fine in dialogue without causing any problems, and yet the script consistently caused a CTD when it tried to set the variable to a new number. There's no consistency here!

zhariphel_construction <- works fine, no problems

uvi_zhar_questmove <- works fine when set in dialogue, CTDs when set in script
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am

Return to III - Morrowind