You can't use, as far as I am aware, custom script calls to library functions. The reason seems to be the prefix when the library is imported is not set-able in any fashion, for instance:
libNakV_gf_lib_voteResetGlobals();
will cause a syntax error, as my editor prefixed it with "lib1", so the function is
lib1_gf_lib_voteResetGlobals();
These are everywhere, even where there is no real reason to use them - like
For each integer var from [custom script: lib_varname -1]
I'm currently replacing the custom scripts with normal GUI function calls.
Another problem I've noticed: With the use of global variables, any attempt to have more than 1 vote running concurrently would break it, or at least, produce undefined behavior. Added a check to make sure vote wasn't already running inside of voteCreate.
Edit:
Ok, after fixing rather a lot of errors with this library, I have something ready sans-testing, will post for others when I've tested it.
http://www.sc2mapster.com/assets/nakama-voting-system/pages/main/ http://static.sc2mapster.com/content/files/446/58/Nakama_Voting_System_1.00.000.SC2Lib
Nakama Voting System (V_1.00.001)
Change Log:
1.00.001
1.00.000 +Initial Release
Features:
This might be a little overwhelming at first but it's actually pretty simple to use.
Default Grammer Text
lib_voteCreate(, generalDelay, generalDefaultOption, timerTitle, timerSeconds, dialogTitle, dialogWidth, dialogHeight, dialogOffset_X, dialogOffset_Y, dialogButton_Amount, dialogButton01_Width, dialogButton01_Height, dialogButton01_OffsetX, dialogButton01_OffsetY, dialogButton01_Tooltip, dialogButton01_Text, dialogButton02_Width, dialogButton02_Height, dialogButton02_OffsetX, dialogButton02_OffsetY, dialogButton02_Tooltip, dialogButton02_Text, dialogButton03_Width, dialogButton03_Height, dialogButton03_OffsetX, dialogButton03_OffsetY, dialogButton03_Tooltip, dialogButton03_Text, dialogButton04_Width, dialogButton04_Height, dialogButton04_OffsetX, dialogButton04_OffsetY, dialogButton04_Tooltip, dialogButton04_Text, dialogButton05_Width, dialogButton05_Height, dialogButton05_OffsetX, dialogButton05_OffsetY, dialogButton05_Tooltip, dialogButton05_Text, dialogButton06_Width, dialogButton06_Height, dialogButton06_OffsetX, dialogButton06_OffsetY, dialogButton06_Tooltip, dialogButton06_Text, dialogButton07_Width, dialogButton07_Height, dialogButton07_OffsetX, dialogButton07_OffsetY, dialogButton07_Tooltip, dialogButton07_Text, dialogButton08_Width, dialogButton08_Height, dialogButton08_OffsetX, dialogButton08_OffsetY, dialogButton08_Tooltip, dialogButton08_Text, dialogButton09_Width, dialogButton09_Height, dialogButton09_OffsetX, dialogButton09_OffsetY, dialogButton09_Tooltip, dialogButton09_Text, dialogButton10_Width, dialogButton10_Height, dialogButton10_OffsetX, dialogButton10_OffsetY, dialogButton10_Tooltip, dialogButton10_Text)
Couple Examples
gv_test[0] = libnakV_gf_lib_voteCreate(1.0, 2, "Difficulty Vote", 1, "Vote for map Difficulty", 600, 1200, 0, 50, 10, 400, 75, 100, 100, "Easiest difficulty in the game.", "Nubish", 400, 75, 100, 175, "Second easiest difficulty.", "Easy", 400, 75, 100, 250, "Standard difficulty. /n Include what each difficulty does.", "Normal", 400, 75, 100, 325, "Second hardest difficulty on the map!!", "Hard", 400, 75, 100, 400, "lolololol", "Masochistic", 400, 75, 100, 400, "lolololol", "Masochistic", 400, 75, 100, 400, "lolololol", "Masochistic", 400, 75, 100, 400, "lolololol", "Masochistic", 400, 75, 100, 400, "lolololol", "Masochistic", 400, 75, 100, 400, "lolololol", "Masochistic");
gv_test[1] = libnakV_gf_lib_voteCreate(0.0, 3, "Difficulty Vote", 1, "Vote for map Difficulty", 600, 600, 0, 50, 1, 400, 75, 100, 100, "Easiest difficulty in the game.", "Nubish1", 400, 75, 100, 175, "Second easiest difficulty.", "Easy", 400, 75, 100, 250, "Standard difficulty. /n Include what each difficulty does.", "Normal", 400, 75, 100, 325, "Second hardest difficulty on the map!!", "Hard", 400, 75, 100, 400, "lolololol", "Masochistic", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test");
gv_test[2] = libnakV_gf_lib_voteCreate(0.0, 4, "Difficulty Vote", 1, "Vote for map Difficulty", 600, 600, 0, 50, 3, 400, 75, 100, 100, "Easiest difficulty in the game.", "Nubish2", 400, 75, 100, 175, "Second easiest difficulty.", "Easy", 400, 75, 100, 250, "Standard difficulty. /n Include what each difficulty does.", "Normal", 400, 75, 100, 325, "Second hardest difficulty on the map!!", "Hard", 400, 75, 100, 400, "lolololol", "Masochistic", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test", 0, 0, 0, 0, "", "Test");
Updated
1.00.001
I'm giving this library a shot, but a quick note:
You can't use, as far as I am aware, custom script calls to library functions. The reason seems to be the prefix when the library is imported is not set-able in any fashion, for instance:
libNakV_gf_lib_voteResetGlobals();
will cause a syntax error, as my editor prefixed it with "lib1", so the function is
lib1_gf_lib_voteResetGlobals();
These are everywhere, even where there is no real reason to use them - like
For each integer var from [custom script: lib_varname -1]
I'm currently replacing the custom scripts with normal GUI function calls.
Another problem I've noticed: With the use of global variables, any attempt to have more than 1 vote running concurrently would break it, or at least, produce undefined behavior. Added a check to make sure vote wasn't already running inside of voteCreate.
Edit: Ok, after fixing rather a lot of errors with this library, I have something ready sans-testing, will post for others when I've tested it.