Scripting errors: what does [some error message] mean?

notdefix

First time out of the vault
Hi,

I'm trying some scripting. I've got BIS mapper setup to log errors to file (can't get the actual game to run in debug mode).

I get the following error

Code:
Script <Map map_update_p_proc>
    Error: script: scripts\kcemit3b.int
    ERROR: attempt to reference map var out of range: 18
    Error: script: scripts\kcemit3b.int
    ERROR: attempt to reference map var out of range: 18!!!!!!
    Error: script: scripts\kcemit3b.int
    ERROR: attempt to reference map var out of range: 18
    Error: script: scripts\kcemit3b.int
    ERROR: attempt to reference map var out of range: 18
    Script Error: scripts\kcemit3b.int: op_set_obj_visibility: obj is NULL

with relevant code snippet in file : kcemit3b.ssl

Code:
import variable Field3b_Ptr;
variable Field_Ptr;

procedure map_update_p_proc begin
  Field_Ptr:=Field3b_Ptr;
end

which is exported in : klatoxcv.ssl
Code:
export variable Field3b_Ptr;



The Script Error: scripts\kcemit3b.int: op_set_obj_visibility: obj is NULL makes sense in the context of the other errors, but I don't know how to interpret:

attempt to reference map var out of range: 18

Anyone who can shed some light on what may be the cause of the error?

edit: added relevant script files.
 

Attachments

Last edited:
Should there be a correlation between the MVAR_ variables declared in the mapname.H and the mapname.GAM files?
I'm not sure exactly what you are asking, but if you mean should they look pretty much the same, then yeah, they usually do. Just grab the KLATOXCV.GAM file from your master.dat and add your Mvars the same way as the ones already there.

Though you obviously don't need to use any headers at all if you don't want to. You can just write "if (map_var(18) == something)" and "set_map_var(18, whatever you want to set it to)" right in the script if you rather do that. That's how the script is going to end up in the end anyway. In the *.GAM file it's mainly the entry itself and it's number that is of real importance, what you call it is not.
 
Back
Top