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

  • Home
  • SEARCH
  • 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 6607783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:32:24+00:00 2026-05-25T19:32:24+00:00

I have an issue in my code please help me. Here is the code

  • 0

I have an issue in my code please help me. Here is the code of mine.

printerView *pvvc=[[printerView alloc] init];
    //[pvvc PrintImage:pvvc.printImageButton];
    //[pvvc getCheckSum];
    NSMutableArray *arrOrderVal=[pvvc getCheckSum];
    unsigned char buffer2[24];
    buffer2[0] = 0X55; buffer2[1]=0x66; buffer2[2]=0x77; buffer2[3]=0x88; buffer2[4]=0x44;//print command
    buffer2[5] = 0X1D; buffer2[6]=0x6B; buffer2[7]=02; buffer2[8]=0x0D; 
    //<set order data
    int arrStart=9;
    for (int i=0; i<13; i++) {
        NSString *val=[arrOrderVal objectAtIndex:i];
        buffer2[arrStart+i]=([val intValue]+30);//[NSString stringWithFormat:@"0x%d",([val intValue]+30)];
    }
    //</set order data

    /*buffer2[9] = 0X35; buffer2[10]=0x30; buffer2[11]=0x30; buffer2[12]=0x30; buffer2[13]=0x33;
     buffer2[14] = 0X35; buffer2[15]=0x37; buffer2[16]=0x37; buffer2[17]=0x30; buffer2[18]=0x33;
     buffer2[19] = 0X30; buffer2[20]=0x31; buffer2[21]=0x38; */

    buffer2[22]=0x37; buffer2[23]=0x30;
    for (int i=0; i<24; i++) {
        NSLog(@"%c",buffer2[i]);
    }

I want to add values for this array dynamically. values are in same format as I have commented.

but this printing it empty values. as below.
2011-09-16 11:58:37.610 SushiTeria[2024:700b] U
2011-09-16 11:58:38.993 SushiTeria[2024:700b] f
2011-09-16 11:58:39.534 SushiTeria[2024:700b] w
2011-09-16 11:58:39.927 SushiTeria[2024:700b] à
2011-09-16 11:58:40.321 SushiTeria[2024:700b] D
2011-09-16 11:58:40.704 SushiTeria[2024:700b] 
2011-09-16 11:58:41.075 SushiTeria[2024:700b] k
2011-09-16 11:58:41.459 SushiTeria[2024:700b] 
2011-09-16 11:58:41.863 SushiTeria[2024:700b] 
2011-09-16 11:58:42.279 SushiTeria[2024:700b] 
2011-09-16 11:58:42.695 SushiTeria[2024:700b] 
2011-09-16 11:58:43.044 SushiTeria[2024:700b] 
2011-09-16 11:58:43.438 SushiTeria[2024:700b] 
2011-09-16 11:58:43.844 SushiTeria[2024:700b] 
2011-09-16 11:58:45.351 SushiTeria[2024:700b] 
2011-09-16 11:58:45.756 SushiTeria[2024:700b] 
2011-09-16 11:58:46.229 SushiTeria[2024:700b] 
2011-09-16 11:58:46.622 SushiTeria[2024:700b] 
2011-09-16 11:58:47.039 SushiTeria[2024:700b] 
2011-09-16 11:58:48.039 SushiTeria[2024:700b] 
2011-09-16 11:58:48.782 SushiTeria[2024:700b] 
2011-09-16 11:58:49.299 SushiTeria[2024:700b] 
2011-09-16 11:58:49.862 SushiTeria[2024:700b] 7
2011-09-16 11:58:50.616 SushiTeria[2024:700b] 0

Thanks in advance.
Shivam

  • 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-05-25T19:32:24+00:00Added an answer on May 25, 2026 at 7:32 pm

    Instead of adding 30 and then printing out the character, you may want to print out the decimal or hexadecimal value.

    NSLog(@"decimal: %d", buffer2[i]);
    

    or

    NSLog(@"hex: %x", buffer2[i]);
    

    You could also print out the character itself to provide context:

    NSLog(@"hex + char: %x (%c)", buffer2[i], buffer2[i]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help! I have a strange issue here. DEMO The issue in this gallery
What is the issue with this code? Here we have two files: classA.h and
Here is my issue. I have an ASPX web site and I have code
Could you, please, help with the following issue? When generate WS client code (with
i have issue regarding Paging using filterexpression. here's the piece of code for filtering
I have an issue with this jquery code below. Please give me advice or
I have an unusual CSS issue in IE7. Here's my html and css code:
I have an issue with php where code works on on computer but wont
I have an issue with SQLAlchemy apparently committing. A rough sketch of my code:
I've been discussing a code style issue with a friend. We have a series

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.