
-----------------------------------
Krocker
Wed Jan 19, 2011 11:39 am

What am i doing wrong?
-----------------------------------
hiya, im creating a game and i keep getting an error. here are the codes:



import GUI

setscreen ("graphics:max;max,nobuttonbar")

% Gives names to variables and their character type
var font1, font2, font3, font4, font5, font6, font7, font8, font9 : int
var score : int
var value : int
var x, y : int


process errorcorrection
    if strintok (strint
        string
        var) = true
            then
    else
    end if
end errorcorrection



loop
    % Sets the background colour black
    GUI.SetBackgroundColor (black)

    % plays an introduction music
    Music.PlayFileLoop ("Intro.MP3")

    % Creates i fade in tittle screen
    font1 := Font.New ("Bookman Old Style:40")
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, 7)
    delay (500)
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, 18)
    delay (500)
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, 20)
    delay (500)
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, 22)
    delay (500)
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, 24)
    delay (500)
    Font.Draw ("TO KNOW OR NOT TO KNOW?", 120, 345, font1, white)


    % Sub-titile
    font9 := Font.New ("Harrington:20")
    Font.Draw ("The Game About Everything and Anything!", 250, 210, font9, 37)

        % Askes the users to given an input in order to continue
        locate (36, 95)

        put "HOLD '1' TO CONTINUE: " ..
        get value

        % Gets the value input in order to exit loop
        if value = 1
                then
            Music.PlayFileStop     % 