Page 1 of 1
Need some help here
Posted: Sat Feb 01, 2003 6:22 am
by 7th Es Cyborg
need some help
when i turn on developer while running my map - mohaa flips out with this
^~^~^ Script Error: binary '+' applied to incompatible types 'NIL' and 'vector'
file 'global/spotlight.scr'
^~^~^ Script Error: Field 'angles' applied to NULL listener
file 'global/spotlight.scr'
^~^~^ Script Error: binary '-' applied to incompatible types 'NIL' and 'vector'
file 'global/spotlight.scr'
^~^~^ Script Error: Cannot cast 'NIL' to vector
file 'global/spotlight.scr'
^~^~^ Script Error: binary '*' applied to incompatible types 'NIL' and 'float'
file 'global/spotlight.scr'
over and over again nonstop - and it's causing major system lag
Posted: Mon Feb 03, 2003 4:16 am
by 7th Es Cyborg
Posted: Mon Feb 03, 2003 6:25 am
by 7th Es Cyborg
I'm yanking out the spotlights for now - If someone can figure this out for a later map, thanks, but for now I'm killing the idea.........

Posted: Mon Feb 03, 2003 7:27 am
by jv_map
Well the error message is supposed to say more than you posted above

.
Posted: Mon Feb 03, 2003 7:39 am
by 7th Es Cyborg
well in 30 secs of running the map the log file hit 1,908 kb - that's how much it is pouring in - I've got the spotlight targeting the path rather than the mg gunner, and from what I can understand in the spotlight.scr, it needs the gunner there to work properly - I just haven't a clue how to make it follow the path and lock on to players but not attempt to trigger a mg gunner.......
Posted: Mon Feb 03, 2003 1:51 pm
by mohaa_rox
The script error means that your spotlights are set wrongly. Gotta ask Surgeon to do an example map on this. Even I can't figure it out.

Posted: Mon Feb 03, 2003 7:00 pm
by 7th Es Cyborg
from what I see the problem lies in the spotlight.scr file. It would have to be rewritten to make it work right. I know some very basic coding, enought to kind of understand the flow of the script, but not enough to actually know how to fix it.
Posted: Mon Feb 03, 2003 7:40 pm
by jv_map
Well it means the script cannot retrieve some necessary data. It should at least quote you a line from the spotlight script and give you a line number.
Posted: Mon Feb 03, 2003 9:11 pm
by 7th Es Cyborg
here are the line errors:
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) + (local.dest[local.i] * local.trans) (global/spotlight.scr, 835)
local.vect = $player.origin - self.origin (global/spotlight.scr, 615)
local.vect = vector_normalize (local.vect) (global/spotlight.scr, 616)
local.angles = angles_toforward ($player.angles) (global/spotlight.scr, 618)
local.vect[0] = local.vect[0] * local.angles[0] (global/spotlight.scr, 619)
local.vect[1] = local.vect[1] * local.angles[1] (global/spotlight.scr, 620)
local.vect[2] = local.vect[2] * local.angles[2] (global/spotlight.scr, 621)
local.org1 = $player.origin + (0 0 64) (global/spotlight.scr, 624)
local.ang1 = $player.angles (global/spotlight.scr, 625)
local.v1 = vector_normalize (local.org1 - local.org2) (global/spotlight.scr, 635)
local.f1 = local.v1[0] * local.v2[0] + local.v1[1] * local.v2[1] + local.v1[2] * local.v2[2] (global/spotlight.scr, 638)
if(local.f1 > 0) (global/spotlight.scr, 639)
local.spottargetorigin = level.spottarget.origin (global/spotlight.scr, 690)
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
self.spotter type_idle "machinegunner" (global/spotlight.scr, 391)
self.spotter type_attack "machinegunner" (global/spotlight.scr, 392)
those aren't all of them, but they all link to a machinegunner in the spotlight.scr
Posted: Tue Feb 04, 2003 5:20 pm
by jv_map
Sorry for annoying you, but this still isn't everything

.
You've omitted the most important lines

.
Maybe you could just copy a part of the raw logfile?
Well a small part that is, no reason to copy the same error 200 times

Posted: Tue Feb 04, 2003 6:49 pm
by 7th Es Cyborg
sry JV - not sure all what you needed - here is a few chunks out of the log
Cvar_Set2: cg_te_mode_name Temp Emitter Off
Cvar_Set2: ui_timemessage
Cvar_Set2: subtitle0
Cvar_Set2: subtitle1
Cvar_Set2: subtitle2
Cvar_Set2: subtitle3
Cvar_Set2: cg_te_mode_name Temp Emitter Off
Cvar_Set2: ui_timemessage
Cvar_Set2: subtitle0
Cvar_Set2: subtitle1
Cvar_Set2: subtitle2
Cvar_Set2: subtitle3
local.spottargetorigin = level.spottarget.origin (global/spotlight.scr, 690)
local.spottargetorigin = level.spottarget^
^~^~^ Script Error: Field 'origin' applied to NULL listener
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin ^
^~^~^ Script Error: binary '-' applied to incompatible types 'vector' and 'NIL'
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (^
^~^~^ Script Error: Cannot cast 'NIL' to vector
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin - local.spottargetorigin) ^
^~^~^ Script Error: binary '<' applied to incompatible types 'NIL' and 'float'
local.spottargetorigin = level.spottarget.origin (global/spotlight.scr, 690)
local.spottargetorigin = level.spottarget^
^~^~^ Script Error: Field 'origin' applied to NULL listener
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin ^
^~^~^ Script Error: binary '-' applied to incompatible types 'vector' and 'NIL'
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (^
^~^~^ Script Error: Cannot cast 'NIL' to vector
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin - local.spottargetorigin) ^
^~^~^ Script Error: binary '<' applied to incompatible types 'NIL' and 'float'
^~^~^ Script Error: Cannot cast 'NIL' to float
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) + (local.dest[local.i] * local.trans) (global/spotlight.scr, 835)
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) + (local.dest[local.i] ^
^~^~^ Script Error: binary '*' applied to incompatible types 'NIL' and 'float'
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) + (local.dest[local.i] * local.trans) (global/spotlight.scr, 835)
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) ^
^~^~^ Script Error: binary '+' applied to incompatible types 'float' and 'NIL'
local.org[local.i] = (local.org[local.i] * (1 - local.trans)) + (local.dest[local.i] * local.trans) (global/spotlight.scr, 835)
local.org^
^~^~^ Script Error: Cannot cast 'NIL' to float
local.spottargetorigin = level.spottarget.origin (global/spotlight.scr, 690)
local.spottargetorigin = level.spottarget^
^~^~^ Script Error: Field 'origin' applied to NULL listener
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin ^
^~^~^ Script Error: binary '-' applied to incompatible types 'vector' and 'NIL'
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (^
^~^~^ Script Error: Cannot cast 'NIL' to vector
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin - local.spottargetorigin) ^
^~^~^ Script Error: binary '<' applied to incompatible types 'NIL' and 'float'
local.spottargetorigin = level.spottarget.origin (global/spotlight.scr, 690)
local.spottargetorigin = level.spottarget^
^~^~^ Script Error: Field 'origin' applied to NULL listener
if (vector_length(self.spotlight.origin - local.spottargetorigin) < self.lightdist) (global/spotlight.scr, 693)
if (vector_length(self.spotlight.origin ^
^~^~^ Script Error: Cannot cast 'NIL' to float
local.vect = $player.origin - self.origin (global/spotlight.scr, 615)
local.vect = $player^
^~^~^ Script Error: Field 'origin' applied to NULL listener
local.vect = $player.origin - self.origin (global/spotlight.scr, 615)
local.vect = $player.origin ^
^~^~^ Script Error: binary '-' applied to incompatible types 'NIL' and 'vector'
local.vect = vector_normalize (local.vect) (global/spotlight.scr, 616)
local.vect = ^
^~^~^ Script Error: Cannot cast 'NIL' to vector
local.angles = angles_toforward ($player.angles) (global/spotlight.scr, 618)
local.angles = angles_toforward ($player^
^~^~^ Script Error: Field 'angles' applied to NULL listener
local.angles = angles_toforward ($player.angles) (global/spotlight.scr, 618)
local.angles = ^
^~^~^ Script Error: Cannot cast 'NIL' to vector
local.vect[0] = local.vect[0] * local.angles[0] (global/spotlight.scr, 619)
local.vect[0] = local.vect[0] ^
^~^~^ Script Error: binary '*' applied to incompatible types 'NIL' and 'NIL'
local.vect[1] = local.vect[1] * local.angles[1] (global/spotlight.scr, 620)
local.vect[1] = local.vect[1] ^
^~^~^ Script Error: binary '*' applied to incompatible types 'NIL' and 'NIL'
local.vect[2] = local.vect[2] * local.angles[2] (global/spotlight.scr, 621)
local.vect[2] = local.vect[2] ^
^~^~^ Script Error: binary '*' applied to incompatible types 'NIL' and 'NIL'
local.org1 = $player.origin + (0 0 64) (global/spotlight.scr, 624)
local.org1 = $player^
^~^~^ Script Error: Field 'origin' applied to NULL listener
local.org1 = $player.origin + (0 0 64) (global/spotlight.scr, 624)
local.org1 = $player.origin ^
^~^~^ Script Error: binary '+' applied to incompatible types 'NIL' and 'vector'
local.ang1 = $player.angles (global/spotlight.scr, 625)
local.ang1 = $player^
Posted: Tue Feb 04, 2003 7:01 pm
by Surgeon
The whole problem is that the spotlight / gunner combo was made specifically for SP maps......I think you wol dhave to sit down and rewrite the spotlight script totally to get just the spotloght working properly........
Posted: Tue Feb 04, 2003 7:02 pm
by jv_map
Right. global/spotlight.scr is trying to track a player with the spotlight and is therefore not suited for multiplayer games.
global/spotlight.scr wrote:if (level.spottarget == NIL)
level.spottarget = $player
This line sets level.spottarget to a player array, which is not an entity and can therefore not be followed.
I'm sorry but you'll need a modified version of the script for multiplayer use.
Posted: Tue Feb 04, 2003 7:03 pm
by jv_map
Hmm nice timing 8)
Posted: Tue Feb 04, 2003 7:21 pm
by 7th Es Cyborg
7th Es Cyborg wrote:from what I see the problem lies in the spotlight.scr file. It would have to be rewritten to make it work right. I know some very basic coding, enought to kind of understand the flow of the script, but not enough to actually know how to fix it.
Yah, I figured that was the problem. I really don't know enough about scripting ( I'm still in my programing basics course in college - lol ) to fix it. I'll play around with it over time and see if I can make any sence out of it.
Thanks for the confirmation of where the problem lies, now a few months and a lot of excedrin and I'll figure out how to redo the script - hehehe