Pocket Plane Group
Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Duality on April 09, 2006, 06:56:31 PM
-
Is there any reason at all why this code snippet wouldn't work?
IF
RandomNum(5, 1)
Global("psGlobeCast", "LOCAL", 0)
THEN
RESPONSE #100
END
IF
RandomNum(5, 2)
Global("psGlobeCast", "LOCAL", 0)
THEN
RESPONSE #100
END
This goes on through (5,5)
With a DestroySelf() once the variable psGlobeCast is set to 1.
psGlobeCast is not defined before this, and it doesn't matter if I set it to 0, the script still doesn't work. So I am assuming that it is the RandomNum() that's causing the problem.
The .cre's in question just sit there stupidly. No matter how long I wait, they do nothing. Any idea as to why?
-
Do you have anything after RESPONSE #100?
-
Yep. Each block is a different ForceSpell (don't ask)
Wait(1)
SetGlobal("psGlobeCast", "LOCAL", 1)
ForceSpell(Player1,TRAP_MAGIC_MISSILE)
and the final block is
IF
Global("psGlobeCast", "LOCAL", 1)
THEN
RESPONSE #100
DestroySelf()
END
The .bcs is assigned correctly, I checked, about 20 times.
-
"LOCALS"
There isn't any other reason in the snippets you posted that it wouldn't work.
-
Well don't I feel silly.
They work fine once you use locals instead of local.
Why is it that the longer you stare at something, the less likely you are to notice the obvious?
-
I'm just wondering what on earth compiler you're using that allows that. I thought they all more or less barfed on funky scope strings...
-
Weidu v.190
There might have been a warning, but no fatal error. And with all the scrolling text, I didn't notice anything. (especially since it was the 50th time I had installed it in the last two hours)
-
Yeah, WeiDU will still compile scripts even if, say, you use a trigger that isn't in TRIGGER.IDS. I found out the hard way that Or() doesn't work in BG1. :(
-
I found out the hard way that Or() doesn't work in BG1. :(
So have I. I had a script that wasn't working, I finally checked the weidu install and low and behold, there was an error.
Maybe the_bigg can turn all those errors into fatal ones.
-
You should really be paying attention to every error that crops up anyway. There's no reason for mods not to have error-free installs.
-
I know. The problem is that when I am installing it repeatedly I get lax in watching for errors that scrawl by.
Thus, I don't usually notice the errors until far later.
-
Since you're using Terminal, --log somewhere/mylog.whatever. After it runs, grep ERROR somewhere/mylog.whatever (in this case, I guess you should also grep WARNING; visit man grep for more help).
-
The things you learn.
That will be a huge help, it certainly beats scrolling through hundreds of lines of text, looking for a "warning".
Thank you.