HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Incredibly Annoying Problem

01-25-2006, 05:47 AM#1
Beeva186
Ok, I've recently started to learn JASS on account of my hatred of the amount of global variables needed for GUI, and am finding it hard to say the least.

However, my trouble learning it isn't the problem. The problem is, when I try and do a simple call DestroyGroup(whatever) or call RemoveLocation(whatever) or any other kind of variable destroying at the end of any function, it comes up with an error saying "Error- invalid argument type (void)" for that line, with what I like to imagine as an incredibly smug smile. Can anybody tell me what in the name of **** is going on?!
01-25-2006, 05:57 AM#2
Earth-Fury
post an example of an entire function that is doing this, please.
01-25-2006, 06:40 AM#3
Beeva186
Woah. Uh, thanks for the help, earth-fury, but it... apparently just decided to stop doing it...
Man, i don't know whether JASS is buggy or what but it's starting to really, really irritate me the way it keeps changing its mind for absolutely no reason, ad nauseam....
01-25-2006, 07:33 AM#4
Daminon
That´s no JASS bug. You just don´t use it right. I had exactly the same problmes when I started to use JASS. Show the script so I can see whats wrong in it.
01-25-2006, 08:46 AM#5
Beeva186
No, I don't think you understand... It wasn't working, and I did nothing to the code whatsoever, then it started working after I exited WE and came back a while later. No changes were made to the script in that time.
01-25-2006, 08:58 AM#6
Earth-Fury
Quote:
Originally Posted by Beeva186
No, I don't think you understand... It wasn't working, and I did nothing to the code whatsoever, then it started working after I exited WE and came back a while later. No changes were made to the script in that time.

what do you mean? :-/ if it had a syntax error, you couldnt have saved it. which means you DIDNT save it if you closed the WE. (which in turn means when you open it again, it goas back to a pre-error "build" of your map.)

you really need to describe things better... saying "heres an error! how do i fix it?!" means nothing. the context of an error usually means more then the error itself. without the context of an error, all the data on the error itself is pretty much useless.
01-25-2006, 09:53 AM#7
qwertyui
Actually, i can say that world editor sometimes exhibits such weird behaviour, when nothing is working, and then without any changes to the code, everything starts working. But this is not limited to Jass only. Happened with GUI triggers for me a lot of times too. Especially with big GUI triggers :/

When my computer tries to start doing stupid stuff like that, i just reboot it and everything is ok for some time again :)

Anyway, about the ivalid argument void error.
Try printing out the contents of what you are about to destroy before you destroy it. Also make sure variable names and capitalisations are correct. And post the trigger code here already ^^.
01-25-2006, 09:54 AM#8
Azazel_
My most common problem in learning Jass is the definitions and declarations. This is what you should roughly have.

local group g = CreateGroup()
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
...
call DestroyGroup(g)
set g = null
call RemoveLocation(l)
set l = null
set u = null
01-25-2006, 11:03 PM#9
Beeva186
Yeah sorry earth-fury I was a bit vague... When I said that WE was giving me that error message, I didn't mean for ONE of my triggers, I meant for ALL triggers in JASS, even ones that worked for other maps. I didn't ask for a solution to a specific script, I asked for a possible reason as to why my WE might hate me so much. EVERY single time I tried to do any kind of removing or destroying of a variable, or imported a script which had that at the end of a function, it gave me the same error. But it's not an issue now, restarting WE worked fine most of the time.
01-25-2006, 11:09 PM#10
Vexorian
Quote:
Originally Posted by qwertyui
Actually, i can say that world editor sometimes exhibits such weird behaviour, when nothing is working, and then without any changes to the code, everything starts working. But this is not limited to Jass only. Happened with GUI triggers for me a lot of times too. Especially with big GUI triggers :/

When my computer tries to start doing stupid stuff like that, i just reboot it and everything is ok for some time again :)

Anyway, about the ivalid argument void error.
Try printing out the contents of what you are about to destroy before you destroy it. Also make sure variable names and capitalisations are correct. And post the trigger code here already ^^.
you probably have a scripts subfolder in your wc3 path, in that case rename it to something else

It could also be that your WE is a cracked one
01-25-2006, 11:19 PM#11
johnfn
Quote:
Originally Posted by qwertyui
Actually, i can say that world editor sometimes exhibits such weird behaviour, when nothing is working, and then without any changes to the code, everything starts working. But this is not limited to Jass only. Happened with GUI triggers for me a lot of times too. Especially with big GUI triggers :/

My guess is that the trigger was so big you didn't notice that there was a change made ;-)
01-26-2006, 08:50 AM#12
Ant
Actually WE does exhibit some really weird behaviour, and I don't even touch JASS.

I've had bugs caused by triggers that weren't even enabled. Perfectly legal untainted WE.
01-26-2006, 09:36 AM#13
Jazradel
Yeh, I agree. My WE used to stuff up all the time. It wouldn't recognise any of my global variables. A restart solved the problem though.