If you pulled your head out of the sand, you would have seen that I already have my own solution for a problem that would require this. Secondly, you must not understand the concept of passing something by value, because the only thing you can use in a condition is a statically typed value or a...
Looks like saw792 didn't actually read through the post, the idea of the thread was a nice workaround to pass an integer by value. Unfortunately you must have never tested a trigger before, because you can't actually pass an integer by value in JASS with this situation. The TriggerAddCondition()...
Alright it is good to know that basic types will exist properly in their scope. Though it doesn't help me in trying to pass something by value. Hopefully someone who hasn't read this will have a nice little juke to make it work.
Sgqvur, you also shouldn't post just to pad your post count.
1. I'm trying to achieve the way to pass an integer by value. I can't be any more clear, and this is the topic of the thread.
2. I'm perfectly aware there isn't a simple built in way to do this in JASS, which is why I am posing on here.
3. I am 100% aware that these are two expressions, I...
Clearly the idea is to save the value of the global by passing it by VALUE to the index of the array in the condition. If you don't understand what I mean by passing something by value as opposed to reference then you probably haven't done any coding outside of JASS and probably will not be able...
That would mean any variable I utilize is passed solely by reference, and not by value. As you see in that global the global will be again like I said
udg_ItemRecipe_ParentKey[udg_ItemRecipe_Counter]
as oppossed to by value
udg_ItemRecipe_ParentKey[1]
Well then please explain why that code continues to evaluate dynamically, causing only the final recipe added to work successfully?
EDIT: Let me try destroying the reference for the trigger and see if that makes a difference.
function ItemRecipe_2items_Conditions takes nothing returns boolean
local integer asdf
set asdf = udg_ItemRecipe_Counter
if ( (UnitHasItemOfTypeBJ(GetTriggerUnit(), LoadInteger(udg_ItemRecipe, udg_ItemRecipe_ParentKey[asdf], 1)) == true) and (UnitHasItemOfTypeBJ(GetTriggerUnit()...
I just gave you an example of what I wanted to do, create a trigger that will display the text of that function when an item is acquired. All I want to know is the syntactically correct way to pass that argument because the compiler doesn't give any useful feedback on the issue, and things like...
I'm not particularly sure if what I am trying to do is legal within JASS, but the compiler and any syntax checker I am using is basically saying there is an error without describing it.
The basic questions is it possible to pass parameters for the Condition and Action portion of a trigger...
Thanks for point out the error lied with destroying the region. I was under the impression that the TriggerRegisterEnterRegion would have preserved its own local copy of the region, which isn't the case. That is why I was removing everything after registering it.
Like I said the condition is...
Anyways regardless of the vJASS integration, as I'm not too preoccupied with that. Regular JASS is good enough for my purposes as of now. I still have yet to get the local trigger to fire even once. For testing purposes I've removed conditions and it still hasn't executed. Anyone able to tell me...