
-----------------------------------
pcmang
Tue Jan 20, 2009 9:39 am

How would I combine these two programs into one?
-----------------------------------
I this learning game I need to make for school but I made half and he made the questions. I'm having problems calling because procs aren't being declared but if I move it, it'll do that same the other way around. 

I need to replace the "you rox" with questions and the "u sux" with the failed procedure(s). (Inno if you need all those passed and failed procedures) and when they click the correct answer to the question I need to go to the passed procedure then the processing procedure. (or if its easier just the processing proc).

import GUI
%Declaration Statement
%P.E.I, Nova Scotia
var winID : int := Window.Open ("position:400;100,graphics:640;400")
var winID2 : int
var font : int
font := Font.New ("Arial:20")
var picID, picID2, picIDon, picIDma, picIDnu, picIDbc, picIDyu, picIDqu: int
var font6 : int
font6 := Font.New ("Arial:12")
var startButton, exitButton : int
var rangeX, rangeY, button:int
var ontarioName, manitobaName, nunavutName, britishcolumbiaName, yukonName, quebecName: string
proc title
    Font.Draw ("Learn Canadian Geography!", 140, 379, font, 0)
end title

proc intro
    Font.Draw ("This program was designed to develop your Canadian Geography knowledge", 70, 355, font6, 0)
end intro

procedure mainScreen
    locate (1, 36)
    put "Learn Canadian Geography!"
    picID := Pic.FileNew ("canada.jpg")
    Pic.Draw (picID, 1, 1, picCopy)
    GUI.Show (startButton)
    GUI.Show (exitButton)
    title
    intro
end mainScreen

proc processing
    winID2 := Window.Open ("position:1;550,graphics:640;400")
    picID2 := Pic.FileNew ("canadapicresize.jpg")
    Pic.Draw (picID2, 1, 1, picCopy)
    drawbox (395,50,500,205,7)
    loop
       mousewhere (rangeX, rangeY, button)
    if button = 1 then 
    if rangeX >= 270 and rangeX = 45 and rangeY = 215 and rangeX = 70 and rangeY = 235 and rangeX = 176 and rangeY = 1 and rangeX = 100 and rangeY = 1 and rangeX = 211 and rangeY = 395 and rangeX = 50 and rangeY 