HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

weird World Editor bug

09-13-2006, 10:16 PM#1
Razernok
I have noticed this weird bug where i have to disable my custom script functions in GUI to get it to save without errors. but after that i can turn those functions back on

here is one of the actions:
Trigger:
Custom script: set udg_b = req(GetManipulatedItem(), GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit())))

What in the world in WE doing to cause this?
09-14-2006, 01:53 AM#2
SentryIII
What's "req", what are the other actions, and what does the error(s) say?
09-14-2006, 02:16 AM#3
Razernok
req is a custom jass function of mine.

everything is correct i even checked it in jass pro.

error said it expected a name.
09-14-2006, 03:20 AM#4
Rising_Dusk
Why don't you show us the whole function and such?
You likely forgot to declare a variable.

Also, this seems like it should be in the triggers forum.
09-14-2006, 03:21 AM#5
Razernok
I checked it all in jass pro and it had no errors.

Sry but I'm keeping it closed source.
09-14-2006, 06:24 AM#6
Captain Griffen
Then we can't help you.
09-14-2006, 06:40 AM#7
PipeDream
Guess he's never releasing his map, so it's irrelevant anyway.
09-14-2006, 07:29 AM#8
Karawasa
Closed? Seriously, keeping code closed source is stupid and selfish.
09-14-2006, 08:03 AM#9
SentryIII
Considering that's the only thing action that's causing problems, it's a very easy problem with a simple solution. udg_b doesn't exist. You have go into the Trigger Editor and press Ctrl+B to bring up the Global Variables dialog. Just add a new variable called "b" and set its datatype to whatever "req" returns. That should fix the problem!
</sarcasm> If you want real help with your problem, either post your code or figure it out on your own. Seriously, this is a simple problem and the only one who can figure it out is you because you have all the information.
09-14-2006, 08:06 AM#10
Razernok
actually udg_b exists and matches the req's return


I moved those functions to the custom script area instead of on a trigger and the error went away.
09-14-2006, 02:53 PM#11
Blade.dk
Post the whole thing, or don't post at all, it's as simple as that.
09-14-2006, 11:31 PM#12
Chuckle_Brother
This is likely a wonderfulicious WE habit that EVEN if you create a function in a trigger(converted to custom text and whatnot) and save+use it in a trigger created after the fact, it will STILL fail to register it as being declared before being called.

I have witnessed this many times, with stuff that works flawlessly on my computer, going to another and it messes up the script order for some reason. The best and safest solution is to do exactly what you did, put utility and high-instance functions in your custom script section.
09-15-2006, 12:21 AM#13
Naakaloh
Quote:
Originally Posted by Razernok
Sry but I'm keeping it closed source.

It's amusing that you say that; if anyone here really wanted the code from a map it would be short work to get it regardless of the protection. Not to mention, we have some of the most brilliant minds in the Warcraft Modding community, it's more likely that we'd write our own code and come up with our own ideas than copy them.

Sentry, I love how you blended the text in so perfectly with the background for the Night Elf theme.
09-15-2006, 10:19 AM#14
Blade.dk
Same with the Underworld theme.. Using color codes is a bad idea.
09-15-2006, 10:59 AM#15
Daelin
Hardly noticeable on any theme. Just tested them all. :P

~Daelin