Homebrew Homebrew Development

YourNerdyJoe

Active Member
Newcomer
Joined
Jul 18, 2014
Messages
41
Trophies
0
Age
26
Website
yournerdyjoe.github.io
XP
179
Country
United States

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
you have input defined inside a while loop so it'll be limited to that scope.
define it once at the top of you main function then set the value throughout your program
I completely forgot that! Thank you! So inside while, i just leave input=hidKeysDown(), without u32, right?
 
  • Like
Reactions: st4rk

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
Github repository updated. Thank you! ;)

Now it's time to fix that drawstring issue!


The issue was that it is mirrored on y axis. That was my fault. I wrote the function. :P

Please update the drawPixel function:


Code:
void drawPixel(int x, int y, char r, char g, char b, u8* screen)
{
    int height=TOP_HEIGHT;
 
    if(*screen & TOP_SCREEN)
    {
        height=TOP_HEIGHT;
    }
    else
    {
        height=BOTTOM_HEIGHT;
    }
    u32 v=(-y+x*height)*3;
    screen[v]=b;
    screen[v+1]=g;
    screen[v+2]=r;
}
 
  • Like
Reactions: AlbertoSONIC

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
The issue was that it is mirrored on y axis. That was my fault. I wrote the function. :P

Please update the drawPixel function:


Code:
void drawPixel(int x, int y, char r, char g, char b, u8* screen)
{
    int height=TOP_HEIGHT;
 
    if(*screen & TOP_SCREEN)
    {
        height=TOP_HEIGHT;
    }
    else
    {
        height=BOTTOM_HEIGHT;
    }
    u32 v=(-y+x*height)*3;
    screen[v]=b;
    screen[v+1]=g;
    screen[v+2]=r;
}
I'll give it a try tomorrow! Goodnight guys!
 

YourNerdyJoe

Active Member
Newcomer
Joined
Jul 18, 2014
Messages
41
Trophies
0
Age
26
Website
yournerdyjoe.github.io
XP
179
Country
United States
The issue was that it is mirrored on y axis. That was my fault. I wrote the function. :P

Please update the drawPixel function:


Code:
void drawPixel(int x, int y, char r, char g, char b, u8* screen)
{
    int height=TOP_HEIGHT;
 
    if(*screen & TOP_SCREEN)
    {
        height=TOP_HEIGHT;
    }
    else
    {
        height=BOTTOM_HEIGHT;
    }
    u32 v=(-y+x*height)*3;
    screen[v]=b;
    screen[v+1]=g;
    screen[v+2]=r;
}

actually it should be change to
u32 v = (height-1-y+x*height)*3;
otherwise v will hold the wrong index which could occasionally be negative
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
actually it should be change to
u32 v = (height-1-y+x*height)*3;
otherwise v will hold the wrong index which could occasionally be negative


Thanks I changed it. :)
I'll give it a try tomorrow! Goodnight guys!


I also noticed I wasn't determining height and width correctly for top and bottom screens. Please update to these new libs.

EDIT: Whoops. Just realized height was same on both screens:
https://www.sendspace.com/file/wl2c44
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Thanks I changed it. :)



I also noticed I wasn't determining height and width correctly for top and bottom screens. Please update to these new libs.

EDIT: Whoops. Just realized height was same on both screens:
https://www.sendspace.com/file/wl2c44

Still get undefined draw_string error.... Please check my code: what do i need to use? Buffer or simply draw_string?
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
It's DrawString, not draw_string.

Also, you will need this: hidScanInput(); before you do u32input=hidKeysDown(); else you won't get any input.
Do i still need to use buffer in order to print a string? Or do i need to use it only for int variables printing?

EDIT: I tried to replace draw_string with drawString, but it says that i used too few arguments. Plus, it seems that there's something wrong with other functions too. Log here:
Code:
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:6:6:
 note: declared here
 void clearScreen(u8* screen,gfxScreen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:34:3
: error: too few arguments to function 'clearScreen'
   clearScreen(screenBottom);
   ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:6:6:
 note: declared here
 void clearScreen(u8* screen,gfxScreen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c: In
function 'main':
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:73:4
5: error: 'BOTTOM_SCREEN' undeclared (first use in this function)
    drawString(buffer1, 1, 1, 255, 255, 255, BOTTOM_SCREEN);
                                             ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:73:4
5: note: each undeclared identifier is reported only once for each function it a
ppears in
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:73:4
: error: too few arguments to function 'drawString'
    drawString(buffer1, 1, 1, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:77:4
: error: too few arguments to function 'drawString'
    drawString(buffer2, 1, 11, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:81:4
: error: too few arguments to function 'drawString'
    drawString(buffer3, 1, 21, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:85:4
: error: too few arguments to function 'drawString'
    drawString(buffer4, 1, 41, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:89:4
: error: too few arguments to function 'drawString'
    drawString(buffer5, 1, 51, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:101:
6: error: too few arguments to function 'drawString'
      drawString("1", 1, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:107:
6: error: too few arguments to function 'drawString'
      drawString("0", 1, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:121:
6: error: too few arguments to function 'drawString'
      drawString("1", 6, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:127:
6: error: too few arguments to function 'drawString'
      drawString("0", 6, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:142:
6: error: too few arguments to function 'drawString'
      drawString("1", 11, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:148:
6: error: too few arguments to function 'drawString'
      drawString("0", 11, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:163:
6: error: too few arguments to function 'drawString'
      drawString("1", 16, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:169:
6: error: too few arguments to function 'drawString'
      drawString("0", 16, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:184:
6: error: too few arguments to function 'drawString'
      drawString("1", 21, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:190:
6: error: too few arguments to function 'drawString'
      drawString("0", 21, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:205:
6: error: too few arguments to function 'drawString'
      drawString("1", 26, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:211:
6: error: too few arguments to function 'drawString'
      drawString("0", 26, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:226:
6: error: too few arguments to function 'drawString'
      drawString("1", 31, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:232:
6: error: too few arguments to function 'drawString'
      drawString("0", 31, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:246:
6: error: too few arguments to function 'drawString'
      drawString("1", 36, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:252:
6: error: too few arguments to function 'drawString'
      drawString("0", 36, 61, 255, 255, 255, BOTTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:263:
4: error: too few arguments to function 'drawString'
    drawString(buffer, 1, 81, 255, 255, 255, BOTTOM_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:264:
4: error: too few arguments to function 'drawString'
    drawString("Press UP to restart this homebrew", 1, 101, 255, 255, 255, BOTTO
M_SCREEN);
    ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/main.c:273:
6: error: too few arguments to function 'drawString'
      drawString("Thank you for using this homebrew!", 1, 121, 255, 255, 255, BO
TTOM_SCREEN);
      ^
In file included from c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConver
ter/source/main.c:7:0:
c:/devkitPro/Projects/3DS/3DSBaseConverter/3DSBinaryConverter/source/draw.h:9:6:
 note: declared here
 void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfx
Screen_t screenPos);
      ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
arm-none-eabi-strip: '3DSBinaryConverter.elf': No such file
[NCCH ERROR] Failed to open elf file '3DSBinaryConverter.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
[NCCH ERROR] Failed to open elf file '3DSBinaryConverter.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
Premere un tasto per continuare . . .

You can find the code here: https://github.com/AlbertoSONIC/3DSBinaryConverter
 

Space Monkey

Member
Newcomer
Joined
Aug 30, 2014
Messages
15
Trophies
0
Age
36
XP
74
Country
Gambia, The
^UP^

Any help?
You seem to lack basic programming skills...

The error message is clear enough: You passed 7 arguments, but the drawString function takes 8. This is the function signature:

void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfxScreen_t screenPos)

You didn't pass u8* screen.
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
You seem to lack basic programming skills...

The error message is clear enough: You passed 7 arguments, but the drawString function takes 8. This is the function signature:

void drawString(char* word, int x,int y, char r, char g, char b, u8* screen,gfxScreen_t screenPos)

You didn't pass u8* screen.
Man, i've taken these draw strings codes from another launcher.dat based homebrew, which is using a completely different way to print strings. That's why i wrote that code. Also, you're probably right. I probably lack basic programming skills. Here's why: i'm 16 years old only and at my school i'm learning some useless C#. My teachers haven't teached me anything about C programming, yet. Everything i know about C is self learned. So please give me time to improve my skills, i'm working very hard on that.

So, back to topic, do i need to use buffer to write EVERY STRING or for INT variables writing only?
 

Space Monkey

Member
Newcomer
Joined
Aug 30, 2014
Messages
15
Trophies
0
Age
36
XP
74
Country
Gambia, The
I probably lack basic programming skills. Here's why: i'm 16 years old only and at my school i'm learning some useless C#. My teachers haven't teached me anything about C programming, yet. Everything i know about C is self learned. So please give me time to improve my skills, i'm working very hard on that.
Sorry if this offended you. The issue though is not about C or C# (I'm myself a C#/.NET developer and have barely any knowledge about C). You should read the error messages carefully and try to understand the error instead of asking in this forum whenever you encounter the slightest problem.

On this page alone you had three problems that were language-agnostic (and are therefor part of basic programming knowledge):
  1. You tried to use a variable outside it's scope. That'll be an error in C# aswell as in C and any other programming language.
  2. You tried to call a method with a spelling that was wrong. The error message was very clear (undefined function). You have to call a function with the name it was defined; in C as in many other languages you even have use the correct casing. drawString and DrawString in C would be different identifier.
  3. You passed a wrong argument list to a function. And again you got a helpful error message: too few arguments; that again would've been a problem in any other programming language.
I don't try to offend you but to help you. If you'd try to solve a problem by yourself before you ask in this thread you would learn a lot quicker and better. So, instead of calling C# useless (which it definetly isn't) you can try to apply common programming knowledge of your teachers lessons from C# to C. (if your teacher himself understands programming)
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
First of all, thank you for your help.
1) It was a mistake that i casually did. I've never done that error another time in the past...

2)I know that it's different. I've done this error due to what Relys said. He said me that i needed to use "DrawString" instead of draw_string. I simply replaced draw_string to DrawString in my code, then i tried to compile it and i saw that it wasn't right. I took a look at draw.c file and saw that i had to insert drawString instead of DrawString. And so i did.

3) I've seen that i needed to add another argument, but i didn't know which one, at least since your post. Again, since at school i've only used Console.WriteLine to print something, these printing methods are just over my knowledge! But i'm trying to learn them, like i did for NDS.

Also, i said that C# is useless because i can use it on windows only (at least that's what i was told), which isn't my main target. I would prefer to learn C, C++, Python and Assembly, but it seems that i have to learn them on my own.

To Relys, i'll take a look to your homebrew. I think it will be very usefull.

P.S. All i've done with C# yet is just a Console Application. Nothing complex.
 

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
First of all, thank you for your help.
1) It was a mistake that i casually did. I've never done that error another time in the past...

2)I know that it's different. I've done this error due to what Relys said. He said me that i needed to use "DrawString" instead of draw_string. I simply replaced draw_string to DrawString in my code, then i tried to compile it and i saw that it wasn't right. I took a look at draw.c file and saw that i had to insert drawString instead of DrawString. And so i did.

3) I've seen that i needed to add another argument, but i didn't know which one, at least since your post. Again, since at school i've only used Console.WriteLine to print something, these printing methods are just over my knowledge! But i'm trying to learn them, like i did for NDS.

Also, i said that C# is useless because i can use it on windows only (at least that's what i was told), which isn't my main target. I would prefer to learn C, C++, Python and Assembly, but it seems that i have to learn them on my own.

To Relys, i'll take a look to your homebrew. I think it will be very usefull.

P.S. All i've done with C# yet is just a Console Application. Nothing complex.
Python eh?

http://learnpythonthehardway.org/

Free version of the e-book if you prefer:

http://learnpythonthehardway.org/book/

Enjoy, it's also a recommended book by the r/programming subreddit, so I'm assuming it's pretty good.
I haven't read it myself, but I plan to read it to use as material to help teach my younger cousin programming in the future.

Anyway, enjoy, and also, that same guy has a book on C as well, might want to check it out. ;)
 
  • Like
Reactions: AlbertoSONIC

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Psionic Roshambo, Thats pretty cool.