A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Need syntax help for (inspect ) script command

Author Topic: Need syntax help for (inspect ) script command (3 messages, Page 1 of 1)
Moderators: Dennis

SGWraith
Joined: Apr 15, 2006

[SG] Clan


Posted: Aug 6, 2007 09:45 PM    Msg. 1 of 3       
How do you use this command?

Quote:

(inspect <expression>)
prints the value of an expression to the screen for debugging purposes.


I found it in the hs_doc and in a tutorial I was reading. This command is useful so I want to be able to use it for testing other scripts I want to make. However, I can't get inspect to print a thing. I've tried several variations of this script but only the sv_say prints anything when the script runs:


(global real variable 5)

(script startup test
(sv_say "lets print our variable")
(inspect variable)
)


It compiles and runs fine but the output from inspect never shows up on the screen. I got this script out of a tutorial by Multix that used to be on the BioCroc forums. Its on this website somewhere in a pdf.

Can anyone help me get a working script that uses inspect so I can figure out how its supposed to work? Help would be appreciated.


SGWraith
Joined: Apr 15, 2006

[SG] Clan


Posted: Aug 7, 2007 01:47 PM    Msg. 2 of 3       
Thanks for your time, Tarzan. I went ahead and put that line in but the variable still isn't being printed.


(global real variable 5)

(script startup test
(sleep 300)
(sv_say "lets print our variable")
(inspect variable)
)


I also tried making it continuous.


(global real variable 5)

(script continuous test
(sleep 300)
(sv_say "lets print our variable")
(inspect variable)
)


Everything compiles and part of it even runs. The sv_say works everytime but theres just no variable getting printed out.

I'm going to try this script in another map to see if that helps, though I don't why it should. If that doesn't work then I'm out of ideas again.

*Edit*

I went ahead and tried it in a bg scenario file. Compiled it and the sv_say works ingame but inspect does not. This is driving me crazy. Do I need to reinstall something? Everything else works though, even some of the other scripts I've tried. I use Kornman's version of the Hek.

Edited by SGWraith on Aug 7, 2007 at 02:03 PM

*Edit 2*

I just tried this version:


(global string variable "5")

(script continuous test
(sleep 300)
(sv_say "lets print our variable")
(inspect variable)
(sv_say "Now trying with sv_say")
(sv_say variable)
)


Inspect still doesn't print but at least I know the variable was made. I've tried compiling the scripts with regular sapien, starting halo in devmode, and the results are still the same. I'm starting to wonder if this command is dedicated server only but that doesn't make much sense since it isn't labeled that way in the hs_doc and no tutorial that used it ever said so.



Edited by SGWraith on Aug 7, 2007 at 02:35 PM


SGWraith
Joined: Apr 15, 2006

[SG] Clan


Posted: Aug 7, 2007 04:47 PM    Msg. 3 of 3       
Quote: --- Original message by: Tarzan
try starting in devmode and manually typing the inspect command into the console.


That did the trick. Manually typing it got it to show me the variable so I guess it ignores that command in scripts or is displaying it only in the console. Thanks for your help, Tarzan, I really appreciated it.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 5:01 PM 125 ms.
A Halo Maps Website