Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9295013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:30:14+00:00 2026-06-18T21:30:14+00:00

So on my end state I want to have the user input their initials.

  • 0

So on my end state I want to have the user input their initials. I have setup an array that has all the alphabet, triggers to select a letter and font_draw, but I cant seem but I get an error saying my function is not defined. Any ideas?

    userInitials: function(){
        io_clear();
        a = 0
        l[0] = " "
        l[1] = "a"
        l[2] = 'b'
        l[3] = 'c'
        l[4] = 'd'
        l[5] = 'e'
        l[6] = 'f'
        l[7] = 'g'
        l[8] = 'h'
        l[9] = 'i'
        l[10] = 'j'
        l[11] = 'k'
        l[12] = 'l'
        l[13] = 'm'
        l[14] = 'n'
        l[15] = 'o'
        l[16] = 'p'
        l[17] = 'q'
        l[18] = 'r'
        l[19] = 's'
        l[20] = 't'
        l[21] = 'u'
        l[22] = 'v'
        l[23] = 'w'
        l[24] = 'x'
        l[25] = 'y'
        l[26] = 'z'
        str = ""

        if(ig.input.pressed('up')){             
            if (a>26){
                a+= 1;
            }else{
                a = 0;
            }
        }

        if(ig.input.pressed('down')){
            if (a<0){
                a -= 1;
            }else{
                a = 26;
            }
        }

        this.font_draw(x,y,str+'['+1[a]+'] ');

        if(ig.input.pressed('space')){
            str += l[a];
        }
    },

    draw:function(){
        if(this.gameOver){
            this.font.draw(userInitials, ig.system.width/2, 95, ig.Font.ALIGN.CENTER);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T21:30:15+00:00Added an answer on June 18, 2026 at 9:30 pm

    When you’re calling functions you want to use 'this'.

    If there’s no current object, ‘this‘ refers to the global object. In a web browser, that’s ‘window’ — the top-level object, which represents the document, location, history and a few other useful properties and methods.

    ‘this’ remains the global object if you’re calling a function:

    So therefore, this.userInitials() will work:

    this.font.draw(this.userInitials(), ig.system.width/2, 95, ig.Font.ALIGN.CENTER);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Back-end: I have a model (User) that has_many of another model (ContactPreference). Front-end: An
I have a User model that belongs to :city :state and :country. A City
When I want to redirect a user who has lost session state back to
Ok, so I want to have a report that does not require the end
I have an interesting situation, well it's probably not that unique at all, but
We have a user table, every user has an unique email and username. We
I have created a database on SQL server and a front end user application
I have a model that is stateful. In each state there are a selection
I want to be able to log when a user ends their session on
I have a form that requires a physical address. Once the user enters the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.