The base variable is set at map init. And, the trigger is enabled about 30 seconds into the game. I was debugging the base variable is correct, the string is correct. However, for some reason, the unit ref is null. I am not enabling any triggers for players that arent playing.
I was debugging through this code and it did execute. Something I noticed when debugging is that the trigger had no events after adding one. The player[p].base.base = Orbitial Command(player 1). However, for some reason whenever anything dies GameOverFFAPlayer1_Func executes. BTW I enable the trigger at about 30 seconds into the game after the mode is picked. I have no other code that is causing the issue, everything is executing in the correct order, I have already checked everything I would think to check. I feel it has something to do with UnitRefFromVariable... Any ideas?
Thanks a ton, I was able to import a new locale file. I prefer doing everything the no-dialog way. It is much more dynamic and easier for me to do, due to what I am used to.
I more have built frameworks and such. I would probably take a different approach to this, but I guess if that's how they do it. So how do I create an external string table in this setup? How do I declare entries? What file do I create to store them in( extension? )? How do I include the file?
"That said text probably does have a class as part of its implementation as a type into the galaxy virtual machine. However only Blizzard has access to the source code for that."
Yes that is why I used the term class. I'm sure they didn't write their data types in galaxy... Anyways, a class and struct are very similar anyways, the only difference is access rights outside the class.
I am not really seeing how text-string maps stored in text files are better than global/temp strings. StringExternal requires a table lookup and therefore, is less accessible and is more performance heavy(not that it really matters in this case). Another reason, why I am not doing it that way is, I am doing a lot of string concatenation( this would require serveral lookups to concatenate several "text" types); this reduces the amount of code needed to accomplish my task, to makes it more readable and more dynamic.
Is there a way to convert text to string? Or even looking at the text class would be nice...
I suppose that is an option. However, for things that are only used ONCE, creating a text tag, displaying a welcome message and so on, I honestly feel is best to use "Magic Values". I do not and have not declared variables for a simple ONE use value that is self explanatory. It confuses the heck out of me reading Param/Value/SomeHexValue in my code. BTW, where and what is the name of this/these files for the standard map? I just saw, StringToText, guess I will use that.
For all my code it compiled this garbage... "Param/Value/SomeHexValue". This happened for things such as, TextTagCreate and so forth. Why does it do this? How can I convert a C string to text, so I can pass "" as an argument?
What is the color type defined as? My guess would be an int_64( not sure what the equivilent in here is ). If so, how are they packing the bytes together into the integer?
0
@ImperialGood: Go
The base variable is set at map init. And, the trigger is enabled about 30 seconds into the game. I was debugging the base variable is correct, the string is correct. However, for some reason, the unit ref is null. I am not enabling any triggers for players that arent playing.
I found this thread http://www.sc2mapster.com/forums/development/galaxy-scripting-and-trigger-lib/40647-arrays-in-an-event-doesnt-work/ Seems it should interpret it correctly, unless structs aren't interpreted correctly.
I am confused out of my mind... Is there anything else I can try? Would seeing more code help?( I don't want to bombard you with code xD )
0
Okay I am having problems with some triggers executing when they are not supposed to. So I have this code here:
I was debugging through this code and it did execute. Something I noticed when debugging is that the trigger had no events after adding one. The player[p].base.base = Orbitial Command(player 1). However, for some reason whenever anything dies GameOverFFAPlayer1_Func executes. BTW I enable the trigger at about 30 seconds into the game after the mode is picked. I have no other code that is causing the issue, everything is executing in the correct order, I have already checked everything I would think to check. I feel it has something to do with UnitRefFromVariable... Any ideas?
0
Yea just what I thought, just making sure. Thanks.
0
Thanks a ton, I was able to import a new locale file. I prefer doing everything the no-dialog way. It is much more dynamic and easier for me to do, due to what I am used to.
0
@ImperialGood: Go
Thanks.
I more have built frameworks and such. I would probably take a different approach to this, but I guess if that's how they do it. So how do I create an external string table in this setup? How do I declare entries? What file do I create to store them in( extension? )? How do I include the file?
"That said text probably does have a class as part of its implementation as a type into the galaxy virtual machine. However only Blizzard has access to the source code for that." Yes that is why I used the term class. I'm sure they didn't write their data types in galaxy... Anyways, a class and struct are very similar anyways, the only difference is access rights outside the class.
0
I am not really seeing how text-string maps stored in text files are better than global/temp strings. StringExternal requires a table lookup and therefore, is less accessible and is more performance heavy(not that it really matters in this case). Another reason, why I am not doing it that way is, I am doing a lot of string concatenation( this would require serveral lookups to concatenate several "text" types); this reduces the amount of code needed to accomplish my task, to makes it more readable and more dynamic.
Is there a way to convert text to string? Or even looking at the text class would be nice...
0
@ImperialGood: Go
I suppose that is an option. However, for things that are only used ONCE, creating a text tag, displaying a welcome message and so on, I honestly feel is best to use "Magic Values". I do not and have not declared variables for a simple ONE use value that is self explanatory. It confuses the heck out of me reading Param/Value/SomeHexValue in my code. BTW, where and what is the name of this/these files for the standard map? I just saw, StringToText, guess I will use that.
0
For all my code it compiled this garbage... "Param/Value/SomeHexValue". This happened for things such as, TextTagCreate and so forth. Why does it do this? How can I convert a C string to text, so I can pass "" as an argument?
0
What is the color type defined as? My guess would be an int_64( not sure what the equivilent in here is ). If so, how are they packing the bytes together into the integer?
0
@ImperialGood: Go
Yea, I guess I just assumed since the first however many files were filed with garbage all of them would be.
0
I thought I was looking in the right place, they were all named natives.galaxy. Anyways, thanks that helps a lot!
0
@ImperialGood: Go
I tried all of them, all the files are filled with junk. Can you provide me with the native list?( dropbox/pastebin link? )
0
@ImperialGood: Go
Thanks I have the file now. How am I supposed to read from it though? It is filed with garbage characters and such.
0
@ImperialGood: Go
Thanks for the reply. Which file do I need from the mpq?
0
@ImperialGood: Go
Which mpq do I extract from? Can you give relative file path?