| 04-28-2009, 06:29 PM | #1 |
So I'm trying to convert a vJass script into Jass so I can add it into a "normal" map. It works fine just by purposly adding an extra "endfunction" in the end of my code/script (my vocabulary in programing is limited). This line will cause an error when I press Save and I can access the code. Now, I've only encountered one problem so far, and that is with the decleration of globals. I know that vJass enables me to declare globals wherever I want, but Jass can't do that! And that's where it all goes wrong, see, I have global decleration inside this script and since it's all moved to the top of the "entire code" (is 'header' the right word?), I can't access it. So... is there any way for me to edit the Global Decleration in normal WE (no add-ons) to get it working? |
| 04-28-2009, 06:32 PM | #2 |
Not without editing the .j file directly / with another program each time. |
| 04-28-2009, 06:52 PM | #3 | |
Quote:
![]() Well, I could try to convert all the globals into local variables, but that will destroy the JESP and efficiency. Ok not really destroy JESP, but disabling it for the moment. I can always make it JESP again. Thanks anyway |
| 04-28-2009, 09:07 PM | #4 |
Arent posts missing here? Anyway, try replacing the globals with constant functions, much like we all old farts used to. |
| 04-28-2009, 11:33 PM | #5 |
You could just rename them to udg_GLOBALNAME and create them in the variable editor. |
| 04-29-2009, 02:22 AM | #6 | |
Quote:
|
| 04-29-2009, 08:01 AM | #7 |
Out of curiosity, why do you need to do this? |
| 04-30-2009, 06:23 AM | #8 |
vJass is good, Juz feel weird why u wan to make it... |
| 05-04-2009, 03:58 PM | #9 | ||
Ouch I havn't checked this in a long time... Sorry Ok 1 quote at a time: Quote:
Quote:
However, he only uses Jass in it (dunno why ) so instead of spending time re-creating the script I could just convert it using Ctrl + C in Syntax Check (the spell is that simple, yes).The only problem I found was declaring global variables, so I thought I'd ask here. There is another solution aswell, and that is to get his map to support vJass (which I don't know how, it just desplays a message saying that it's an older version) |
| 05-04-2009, 05:13 PM | #10 |
is his we up to date? hje needs at least patch 1.21 so jngp works. edit: thanks whoever killed the multiple posts. I dont know why that happened and couldnt fix it either. |
| 05-05-2009, 04:15 PM | #11 | |
Quote:
I mean, I can't open any pre-existing maps with JNPG and implent vJass scripts to them, so I figured that he wouldn't be able to either. Am I the only one experiencing that problem? |
| 05-05-2009, 07:26 PM | #12 | |
Quote:
|
| 05-06-2009, 09:44 AM | #13 | |
Quote:
Perhaps I should create a new thread here about it. |
| 05-06-2009, 11:52 AM | #14 |
He is not your friend, abaddon him (and tell to install newgenpack) |
| 05-06-2009, 12:05 PM | #15 | |
Quote:
|
