Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Execution Window not popping up when I press the run button
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SAValkyrie




PostPosted: Mon Dec 10, 2012 10:06 am   Post subject: Execution Window not popping up when I press the run button

What is it you are trying to achieve?
To fix the game menu
What is the problem you are having?
<When I use forward procedure in my codes, the execution window doesn't pop up. However, when I run it without forward procedures, it works fine.>

Describe what you have tried to solve this problem
<>

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


%January ____ 2013%
%Bomberman Game:%
%Menu%
import GUI
forward procedure menu
forward procedure options
forward procedure help
forward procedure start
%%%
var finished : boolean := false
process backgroundmusic
    loop
        exit when finished
        Music.PlayFile ("Diddy Kong Racing - Lobby Theme Tune.mp3")
    end loop
end backgroundmusic
fork backgroundmusic
%%%
body procedure start
    put "Process 1"
end start
%%%
procedure musicon
    Music.PlayFileLoop ("Diddy Kong Racing - Lobby Theme Tune.mp3")
end musicon
procedure musicoff
finished:=true
    Music.PlayFileStop
end musicoff
%%%
body procedure options
cls
    put "Settings"
    var button4:int:=GUI.CreateButton (0,25,0,"MUSIC ON", musicon)
    var button5:int:=GUI.CreateButton (150,25,0,"MUSIC OFF", musicoff)
end options
%%%
body procedure help
    cls
    put "Game Controls"
    put "Controls" : 20, "Keys"
    put "Move Up" : 20, "Up Arrow"
    put "Move Down" : 20, "Down Arrow"
    put "Move Right" : 20, "Right Arrow"
    put "Move Left" : 20, "Left Arrow"
    put "Place Bomb" :20, "Space Bar"
end help
%%%
%MENU%
body procedure menu
var button1 : int := GUI.CreateButton (100, 0, 0, "START", start)
var button2 : int := GUI.CreateButton (200, 0, 0, "OPTIONS", options)
var button3 : int := GUI.CreateButton (300, 0, 0, "HELP", help)
end menu
%%%
loop
    exit when GUI.ProcessEvent
end loop



Please specify what version of Turing you are using
<Turing 4.1.1>
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Mon Dec 10, 2012 4:50 pm   Post subject: RE:Execution Window not popping up when I press the run button

You've got a lot of procedures written but this is the only code that ever actually runs:

code:
loop
    exit when GUI.ProcessEvent
end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: