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

Username:   Password: 
 RegisterRegister   
 I Have A If Else procedure error in Turing
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Thesmuggler




PostPosted: Sun Nov 12, 2017 1:17 pm   Post subject: I Have A If Else procedure error in Turing

My GUI buttons call the procedures and the quit button works fine but when i use the start button it calls the procedure but stops after?
please comment if you know how i can fix this!

*This is built in Turing 4.1.1*

%Start Program Program By Nathan Russell - Grade 10
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Basic Setup
import GUI
setscreen ("graphics:1360;720,nobuttonbar")
colorback (black)
Text.Color (48)
cls
%End Basic Setup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Fonts
var FontOne : int
FontOne := Font.New ("Random:10")
var FontTwo : int
FontTwo := Font.New ("Random:15")
var FontThree : int
FontThree := Font.New ("Random:20")
var FontFour : int
FontFour := Font.New ("Random:25")
var FontFive : int
FontFive := Font.New ("Random:30")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Font.Draw ("*[Built With Turing 4.1.1 *Other Versions May NOT Work]*",maxx div 2.75,maxy div 2,FontOne,48)
Font.Draw (" *[Big Thanks To Compsci Community]*",maxx div 2.75,maxy div 2.25,FontOne,48)
var LoadingOverlay : int := Pic.FileNew ("Loading_Overlay.bmp")
Pic.Draw (LoadingOverlay,0,50, picMerge)
delay (3800)
cls
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Main Menu Load
var MM_Background : int := Pic.FileNew ("MM_Background.bmp")
var OBP_Banner : int := Pic.FileNew ("OBP_Banner.bmp")
colorback (red)
cls
Pic.Draw (OBP_Banner, maxx div 8, maxy div 8, picMerge)
delay (5000)
colorback (black)
cls
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Main Menu
var MM_StartButton : int := Pic.FileNew ("MM_StartButton.bmp")
var MM_QuitButton : int := Pic.FileNew ("MM_QuitButton.bmp")
Pic.Draw (MM_Background,0,0, picCopy)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var StartButtonPressed: boolean := false
%Quit Button
procedure QuitButtonPro
cls
Font.Draw ("[*You Quit The Game*]",maxx div 2.75,maxy div 2,FontThree,48)
delay (1000)
quit
end QuitButtonPro
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Startbutton
procedure StartButtonPro
StartButtonPressed := true
end StartButtonPro
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ButtonCode
if StartButtonPressed = false then
var StartButton:int:=GUI.CreateButton(375,110,640,"",StartButtonPro)
GUI.SetSize (StartButton, 640, 125)
var QuitButton:int:=GUI.CreateButton(0,620,0,"",QuitButtonPro)
GUI.SetSize (QuitButton, 100, 100)
Pic.Draw (MM_StartButton, maxx div 100, maxy div 8, picMerge)
Pic.Draw (MM_QuitButton,0,0, picMerge)
loop
exit when GUI.ProcessEvent
end loop
else
cls
var EpisodeOneLoading : int := Pic.FileNew ("EpisodeOneLoading.bmp")
Pic.Draw (EpisodeOneLoading,0,0, picCopy)
Pic.Draw (LoadingOverlay,0,50, picMerge)
delay (3000)
cls
end if
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Operation Black Powder.zip
 Description:
- download my project
- password : OBP1324

Download
 Filename:  Operation Black Powder.zip
 Filesize:  1.42 MB
 Downloaded:  10 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: