Jump to content


Photo

What The Hell Is Wrong With My Latest Scipt


  • Please log in to reply
3 replies to this topic

#1 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 24 March 2004 - 09:27 PM

This script isn't working yet

CODE

;######################################
;# Name: ColorSelector.xas
;# By: flattspott
;# Version: 0.1
;# Purpose: Allows user to select from a list of colors
;# Usage: This is not supposed to be used as a standalone script.
;#            It should be called from another script
;#          
;#           CallFile <Path>\ColorSelector.xas
;#          
;#            The outputed variable will be _Color [%_Color%]
;#
;######################################
MsgBox "Color Selector Test"
SetState Blank
Set Left 47
Goto Refresh
:Refresh
BeginDraw
TEXT 233 178 CENTER "Color Selector"
TEXT 233 333 CENTER "Press A to select"
BOX 0 141 640 5 0xFFFFFFFF
BOX 0 387 640 5 0xFFFFFFFF
BOX 0 234 640 5 0xFFFFFFFF
BOX 0 291 640 5 0xFFFFFFFF
BOX 55 255 20 20 0xFF000000
BOX 90 255 20 20 0xFFFFFFFF
BOX 125 255 20 20 0xFF0000FF
BOX 160 255 20 20 0xFFFF0000
BOX 195 255 20 20 0xFFFF8000
BOX 230 255 20 20 0xFFFFFF00
BOX 265 255 20 20 0xFF00FF00
BOX 300 255 20 20 0xFF800080
BOX 335 255 20 20 0xFF9F9F9F
BOX 370 255 20 20 0xFF808000
BOX 405 255 20 20 0xFF004080
BOX 440 255 20 20 0xFF800000
BOX 475 255 20 20 0xFF408080
BOX 510 255 20 20 0xFF00B300
BOX 545 255 20 20 0xFFD2D200
BOX %Left% 247 35 35 0x00FF0000 0xFFDFDFDF
EndDraw
Goto GetInput
:GetInput
If %_GP_D_RT% == "1" Goto Next
If %_GP_D_LF% == "1" Goto Back
If %_GP_A% == "1" Goto GetColor
Goto GetInput
:Next
If %Left% == "537" Then
  Set Left 47
Else
  Add Left 35
EndIf
Goto Refresh
:Back
If %Left% == "47" Then
  Set Left 537
Else
  Sub Left 35
EndIf
Goto Refresh
:GetColor
If %Left% == "47" Goto SetColor1
If %Left% == "82" Goto SetColor2
If %Left% == "117" Goto SetColor3
If %Left% == "152" Goto SetColor4
If %Left% == "187" Goto SetColor5
If %Left% == "222" Goto SetColor6
If %Left% == "257" Goto SetColor7
If %Left% == "292" Goto SetColor8
If %Left% == "327" Goto SetColor9
If %Left% == "362" Goto SetColor10
If %Left% == "397" Goto SetColor11
If %Left% == "432" Goto SetColor12
If %Left% == "467" Goto SetColor13
If %Left% == "502" Goto SetColor14
If %Left% == "537" Goto SetColor15
:SetColor1
Set _Color "0xFF000000"
Goto End
:SetColor2
Set _Color "0xFFFFFFFF"
Goto End
:SetColor3
Set _Color "0xFF0000FF"
Goto End
:SetColor4
Set _Color "0xFFFF0000"
Goto End
:SetColor5
Set _Color "0xFFFF8000"
Goto End
:SetColor6
Set _Color "0xFFFFFF00"
Goto End
:SetColor7
Set _Color "0xFF00FF00"
Goto End
:SetColor8
Set _Color "0xFF800080"
Goto End
:SetColor9
Set _Color "0xFF9F9F9F"
Goto End
:SetColor10
Set _Color "0xFF808000"
Goto End
:SetColor11
Set _Color "0xFF004080"
Goto End
:SetColor12
Set _Color "0xFF800000"
Goto End
:SetColor13
Set _Color "0xFF408080"
Goto End
:SetColor14
Set _Color "0xFF00B300"
Goto End
:SetColor15
Set _Color "0xFFD2D200"
Goto End
:End
MsgBox "%_Color%"
Quit


I relalize in the info part is say it should be called from another script but that wasn't working so it changed it temporarily to debug it.

What happens is the first MsgBox comes up then after some input it locks up the Xbox, (X2 IGR doesn't respond either). Anyone see any problems or have a solution?

#2 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 25 March 2004 - 03:10 AM

Why not try running it with mxmdebug.xbe, and figuring out exactly what line it hangs on?

#3 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 25 March 2004 - 03:51 AM

Damn, forgot about that. But still have no idea what's going on

CODE

Initialized
Listening for incoming connections on port 7500
Initiated communication with 192.168.0.2
Connected to Xbox!
=============================
Media X Menu
Version 0.9o Beta WIP (1191)
01:00:32 Mar  6 2004
XDK Version: 5558
=============================

00:00:40.664 I0 SYS New Button Presses 0x00000100 (00)
00:00:40.681 I0 SYS Key found for input [UI_SELECT] (0xf011) 177 0 0 0
00:00:40.681 I0 SYS Messages in Input Queue: 1
00:00:40.692 I0 APP Setting MXMState current item to: 1
00:00:40.692 I0 SCR Entering ActionScript object=0x00de10d0
00:00:40.692 I0 SYS EnterMenu
00:00:40.692 I0 SYS      2047  total MB of virtual memory.
00:00:40.692 I0 SYS      2029  free  MB of virtual memory.
00:00:40.693 I0 SYS  67108864  total    of physical memory.
00:00:40.693 I0 SYS  42582016  free     of physical memory.
00:00:40.693 I0 SYS         0  total MB of paging file.
00:00:40.693 I0 SYS         0  free  MB of paging file.
00:00:40.693 I0 SYS         0% percent of memory is in use.
00:00:40.762 I0 SCR Entering ActionScript object=0x00a62010
00:00:40.762 I0 SYS EnterMenu
00:00:40.762 I0 SYS      2047  total MB of virtual memory.
00:00:40.762 I0 SYS      2029  free  MB of virtual memory.
00:00:40.762 I0 SYS  67108864  total    of physical memory.
00:00:40.762 I0 SYS  42582016  free     of physical memory.
00:00:40.762 I0 SYS         0  total MB of paging file.
00:00:40.762 I0 SYS         0  free  MB of paging file.
00:00:40.762 I0 SYS         0% percent of memory is in use.
00:00:40.764 I0 SYS Creating System Object 0x00deb3b0 (2) (2) AutoDelete
00:00:46.353 I0 SYS New Button Presses 0x00000100 (00)
00:00:46.375 I0 SYS Key found for input [UI_SELECT] (0xf011) 133 0 0 0
00:00:46.375 I0 SYS Messages in Input Queue: 1
00:00:46.376 I0 SYS UI Event: 65537 0 0x00000000 0x00000000
00:00:46.376 I0 SYS Destroying System Object 0x00deb3b0
00:00:46.550 I0 SYS EnterMenu
00:00:46.550 I0 SYS      2047  total MB of virtual memory.
00:00:46.550 I0 SYS      2029  free  MB of virtual memory.
00:00:46.550 I0 SYS  67108864  total    of physical memory.
00:00:46.550 I0 SYS  42582016  free     of physical memory.
00:00:46.550 I0 SYS         0  total MB of paging file.
00:00:46.550 I0 SYS         0  free  MB of paging file.
00:00:46.550 I0 SYS         0% percent of memory is in use.
00:00:46.550 I0 APP Activating App State
00:00:46.550 I0 APP App State Activated
00:00:46.550 I1 APP ===SETGAMESTATE=== (10)
00:00:46.554 I0 APP Exiting StateApp::Render Oneshot
00:00:46.556 I0 SYS Creating System Object 0x00de8d90 (3) (3) AutoDelete
Error while trying to read information from client - connection probably closed192.168.0.2


#4 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 25 March 2004 - 04:10 AM

You'll have to turn on the messages for scripts. By default they're off, as they generate too much text.

Edit:

MSGLOG SETFILTER NET INFO ALL ON
MSGLOG SETFILTER NET WARNING ALL ON
MSGLOG SETFILTER NET ERROR ALL ON
MSGLOG SETFILTER NET CRITERROR ALL ON
MSGLOG SETLEVEL NET 0
MSGLOG SETOUTPUT NET 1.1.1.1
MSGLOG ENABLE NET ON

Found this while browsing... Should fix it.

Edited by geniusalz, 25 March 2004 - 04:27 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users