[Jass]Help with this function idk where is my mistake
Moderator: Cheaters
-
- Senior Member
- Posts: 123
- Joined: August 27th, 2010, 7:14 am
[Jass]Help with this function idk where is my mistake
Hello,I want to use the "-clickkill" to enable JJXSKFUNC1 which kills all units i select,but after using the code below i cant open the map,help me please i am not really good in Jass i just copied this from another cheat pack
Spoiler:
-
- Old Wrinkly Member
- Posts: 202
- Joined: September 15th, 2010, 5:09 am
- Title: Legenda
Re: [Jass]Help with this function idk where is my mistake
try put func JJXSKFUNC2 script above func JJXSKFUNC1
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: [Jass]Help with this function idk where is my mistake
If you cant oppen the map you have a syntax error.
Press F9 in jasscraft.
Also you need to paste the war3map.j file so we can see how to fix as you might have placed it in a bad place or used a bad variable name, there can be a lot of reason to make a code file not work.
Press F9 in jasscraft.
Also you need to paste the war3map.j file so we can see how to fix as you might have placed it in a bad place or used a bad variable name, there can be a lot of reason to make a code file not work.
-
- Senior Member
- Posts: 123
- Joined: August 27th, 2010, 7:14 am
Re: [Jass]Help with this function idk where is my mistake
Thanks guys i made it work by putting JJXSKFUNC2 above JJXSKFUNC1 and removing loop & endloop
Thats the working code:
But i have another question,I want to know what does take more space in the map between that working code above and this one below:
I already made the code below before making the one above it but i wasnt sure if there is a difference in the taken space so thats my second question
Thats the working code:
Spoiler:
Spoiler:
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: [Jass]Help with this function idk where is my mistake
Cant understand your question... What do you mean it takes space?
-
- Senior Member
- Posts: 123
- Joined: August 27th, 2010, 7:14 am
Re: [Jass]Help with this function idk where is my mistake
when you add stuff to a war3map.j you increase its size which increase the map's size
I did two codes which have the same result and i want to use the one which will make the war3map.j less bigger then possible
EDIT:after putting both codes in separated .j files and saving them i found out that the one with the command fused with JJXSKFUNC1 takes less space on the map than the one were the command calls for ExecuteFun"JJXSKFUNC1"
there is 98 bytes difference between the two files but it might be bigger if it was multiple codes,so now i just learned that making a command fused with a function like below...
takes less place than making the command calls for the function like below
Thanks for your help mates
I did two codes which have the same result and i want to use the one which will make the war3map.j less bigger then possible
EDIT:after putting both codes in separated .j files and saving them i found out that the one with the command fused with JJXSKFUNC1 takes less space on the map than the one were the command calls for ExecuteFun"JJXSKFUNC1"
there is 98 bytes difference between the two files but it might be bigger if it was multiple codes,so now i just learned that making a command fused with a function like below...
Spoiler:
Spoiler:
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: [Jass]Help with this function idk where is my mistake
Of course deleting more lines of code will decrease its size, but code isn't always just about size. Most aspect of any code is to make sure any one can just read it and understand it. Seperating big codes to small functions is very common, and in fact needed.
But meh, won't matter. Less code = less space. But that won't mean more efficiency.
But meh, won't matter. Less code = less space. But that won't mean more efficiency.