I'm not sure what the limit is (I'm sure someone here does) but I can't really think of any reason for you to exceed that limit. There is probably some other reason your variable isn't working the way you want it to, but I need more information to help you further.
Then in the trigger I tried to set the variable but it wasn't in the list of available variables. So I deleted it made it again still didn't appear on list so I tried saving it still wasn't on list. So I deleted a few variables that I made obsolete it still didn't appear, so I deleted it and recreated it then it would appear on list.
But it may become an issue : / because right now I'm at 44k lines of triggers and if I need more variables later which I'm sure I will I may run into this issue again.
While I'm at it any clue on whats the maximum amount of Actions/Triggers before it concs out?
The only reason I can think of for it not appearing in the list of variables is if you already define the type of variable on the right-hand side of the equation, which would exclude any available variables to that type. For example, if you have something like 'Variable = (triggering unit)' where Variable hasn't been selected yet, the only available options would be Unit variables.
No it was just a global variable I made it wasn't the only one that didn't show up in list I made 6 variables the first 3 appeared in the
set variable action
Like I said I deleted and remade them in hopes that would have them show up to no avail, but the other 3 wouldn't appear until I deleted other variables and even then I had to delete them and remake them before they would appear.
When you reach max variables I'm pretty sure you can still add variables to the editor, just when you try to save it tells you that you've reached max.
Whats the maximum number of variables? And does each Array take up several of those variable points? Also do local variables count toward this?
Local and global variables use separated memory space:
- Local variables can store 8191 values before the limit is reached. (Editor shows an error message.)
- Global variables can store 4,181,407 values before the limit is reached. (Ingame error pops up when limit is reached when you start the map.) But you will have problems before that in your map as triggers require global variable space, too.
If you use booleans, it's less as those only use up 25% of the space of another variable type.
When you use a computer player, the global variable memory limit is lower (as the AI code uses up some of that memory).
Arrays use up space depending on their length. If you define an array with Real[9] in the trigger module, then it has 10 variables within it using the indexes 0 to 9.
The trigger debugger displays your global variable memory usage in percent in the bottom right corner of the window.
@ the not appearing problem
I've no idea, but worst case scenario is using custom script as descriped by BasharTeg.
Whats the maximum number of variables? And does each Array take up several of those variable points? Also do local variables count toward this?
Because I noticed in my map I created a new variable but couldn't access that variable : /
I'm not sure what the limit is (I'm sure someone here does) but I can't really think of any reason for you to exceed that limit. There is probably some other reason your variable isn't working the way you want it to, but I need more information to help you further.
Well I created the variable
Trade Menu = No Dialog Item <Dialog Item[9][9]>
Then in the trigger I tried to set the variable but it wasn't in the list of available variables. So I deleted it made it again still didn't appear on list so I tried saving it still wasn't on list. So I deleted a few variables that I made obsolete it still didn't appear, so I deleted it and recreated it then it would appear on list.
But it may become an issue : / because right now I'm at 44k lines of triggers and if I need more variables later which I'm sure I will I may run into this issue again.
While I'm at it any clue on whats the maximum amount of Actions/Triggers before it concs out?
The only reason I can think of for it not appearing in the list of variables is if you already define the type of variable on the right-hand side of the equation, which would exclude any available variables to that type. For example, if you have something like 'Variable = (triggering unit)' where Variable hasn't been selected yet, the only available options would be Unit variables.
@gkill25: Go
Did you make the variable a constant?
Arrays max at 8192
I remember compile errors at [8192][8192] which is 67108864 variables. So i believe its less than that.
No it was just a global variable I made it wasn't the only one that didn't show up in list I made 6 variables the first 3 appeared in the
set variable action
Like I said I deleted and remade them in hopes that would have them show up to no avail, but the other 3 wouldn't appear until I deleted other variables and even then I had to delete them and remake them before they would appear.
When you reach max variables I'm pretty sure you can still add variables to the editor, just when you try to save it tells you that you've reached max.
Search for your variable in the Overview Editor to make sure that it exists.
You can also try using custom script to set the variable by name. I think the naming convention for global variables is "gv_your_variable_name".
The format for setting a variable in custom script is simply "variable = value;".
Local and global variables use separated memory space:
- Local variables can store 8191 values before the limit is reached. (Editor shows an error message.)
- Global variables can store 4,181,407 values before the limit is reached. (Ingame error pops up when limit is reached when you start the map.) But you will have problems before that in your map as triggers require global variable space, too.
If you use booleans, it's less as those only use up 25% of the space of another variable type.
When you use a computer player, the global variable memory limit is lower (as the AI code uses up some of that memory).
Arrays use up space depending on their length. If you define an array with Real[9] in the trigger module, then it has 10 variables within it using the indexes 0 to 9.
The trigger debugger displays your global variable memory usage in percent in the bottom right corner of the window.
@ the not appearing problem
I've no idea, but worst case scenario is using custom script as descriped by BasharTeg.
Alright thanks for the info.