Sprite GFX 0 is already in use. Error code 109

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
Also i have one more question, how do you use multiple scripts in 1 project as i have no idea what how to use that
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
Do you ask how I manage a project? I'm using code::blocks IDE. I used this tutorial:
https://whatroidoes.wordpress.com/2...itpro-with-codeblocks-and-debug-with-insight/
However if project grows a bit it likes to crash, but that don't bother me much.
Maybe I'm using less stable version. Some scripts can share same variables so sometimes you need to add "extern" to be declared as something global to both (however is better to avoid if possible) or include the file that defines some functions to the other one that is using them.
obraz_2023-08-14_042205376.png
 

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
Do you ask how I manage a project? I'm using code::blocks IDE. I used this tutorial:
https://whatroidoes.wordpress.com/2...itpro-with-codeblocks-and-debug-with-insight/
However if project grows a bit it likes to crash, but that don't bother me much.
Maybe I'm using less stable version. Some scripts can share same variables so sometimes you need to add "extern" to be declared as something global to both (however is better to avoid if possible) or include the file that defines some functions to the other one that is using them.
View attachment 388259
I tried adding another sprite and im running out of vram, should i optimize my background more?

#include <nds.h>
#include <maxmod9.h>
#include <nf_lib.h>
#include <stdio.h>
#include "soundbank.h"
#include "soundbank_bin.h"

volatile int frame = 0;

void Initialize()
{
NF_SetRootFolder("NITROFS");
NF_Set2D(0, 0);
NF_InitTiledBgBuffers();
NF_InitTiledBgSys(0);

NF_InitSpriteBuffers();
NF_InitSpriteSys(0);

NF_LoadSpriteGfx("ui/birdekek", 0, 64, 64);
NF_LoadSpritePal("ui/birdekek", 0);

NF_VramSpriteGfx(0, 0, 0, false);
NF_VramSpritePal(0, 0, 0);

NF_LoadSpriteGfx("ui/mp", 1, 64, 32);
NF_LoadSpritePal("ui/mpp", 0);

NF_VramSpriteGfx(1, 1, 8, false);
}

void Vblank()
{
frame++;
}

int main(int argc, char** argv)
{
mmInitDefaultMem((mm_addr)soundbank_bin);

irqSet(IRQ_VBLANK, Vblank);

consoleDemoInit();

Initialize();

consoleClear();
setBrightness(0, -16); // Set initial brightness to complete darkness

NF_CreateSprite(0, 0, 0, 0, 96, 32);

mmLoadEffect(SFX_BIRDEKEK);

mmEffect(SFX_BIRDEKEK);

for (int i = 0; i < 120; i++)
{
NF_SpriteOamSet(0);
setBrightness(0, -16 + (i / 7.5f)); // Adjusted the calculation for faster reverse fade
swiWaitForVBlank();
oamUpdate(&oamMain);
}

setBrightness(0, 0);

NF_DeleteSprite(0, 0);

mmLoad(MOD_MAINTHEME);
mmStart(MOD_MAINTHEME, MM_PLAY_LOOP);

NF_LoadTiledBg("maps/mainscreen", "main_bg", 256, 256);
NF_CreateTiledBg(0, 3, "main_bg");

u8 r, g, b;
s16 cR, cG, cB;
u8 speed = 0;
u16 n = 0;

NF_FreeSpriteGfx(0, 0);
NF_UnloadSpritePal(0);

NF_CreateSprite(1, 1, 8, 0, 96, 32);


speed = 0;

for (int i = 0; i < 8; i++) { // Loop from 0 to 255 for smooth transition
for (n = 0; n < 256; n++) {
NF_BgGetPalColor(0, 3, n, &r, &g, &b);
cR = r;
cG = g;
cB = b;

cR += 25;
cG += 25;
cB += 25;
// Decrease the color components
cR--;
if (cR < 0) cR = 0;
cG--;
if (cG < 0) cG = 0;
cB--;
if (cB < 0) cB = 0;

// Update palette color
NF_BgEditPalColor(0, 3, n, cR, cG, cB);
}
NF_BgUpdatePalette(0, 3); // Update the palette

speed++;
if (speed > 1) { // Adjust this value to control the speed of the transition
speed = 0;
}

swiWaitForVBlank(); // Wait for vertical blank
oamUpdate(&oamMain);
}

while (1)
{
swiWaitForVBlank();
}

return 0;
}
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
this may be difficult to do - NF_VramSpriteGfx(1, 1, 8, false);
if you intented display another sprite on the main screen then you need type NF_VramSpriteGfx(0, 1, 8, false);
If you want to use second screen then you need add things like:
NF_Set2D(1, 0);NF_InitSpriteSys(1); NF_SpriteOamSet(1);oamUpdate(&oamSub);
There's a lot of space in VRAM, but if you plan to fit more maybe this can be helpful
https://mtheall.com/banks.html
 
Last edited by plasturion,

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
ok i fixed the vram issue "i forgot to include some of the nessecary things to render bg's and sprites"

but i got the sprite working but its only displaying a single 8 by 8 tile of my sprite

#include <nds.h>
#include <maxmod9.h>
#include <nf_lib.h>
#include <stdio.h>
#include "soundbank.h"
#include "soundbank_bin.h"

volatile int frame = 0;

void Initialize()
{
NF_SetRootFolder("NITROFS");
NF_Set2D(0, 0);
NF_Set2D(1, 0);
NF_InitSpriteSys(1);
NF_SpriteOamSet(1);

NF_InitTiledBgBuffers();
NF_InitTiledBgSys(0);
NF_InitTiledBgSys(1);

NF_InitSpriteBuffers();
NF_InitSpriteSys(0);

NF_LoadSpriteGfx("ui/mp", 1, 128, 32);
NF_LoadSpritePal("ui/mp", 2);

NF_VramSpriteGfx(1, 1, 8, false);
NF_VramSpritePal(1, 2, 4);

NF_LoadSpriteGfx("ui/birdekek", 0, 64, 64);
NF_LoadSpritePal("ui/birdekek", 0);

NF_VramSpriteGfx(0, 0, 0, false);
NF_VramSpritePal(0, 0, 0);
}

void Vblank()
{
frame++;
}

int main(int argc, char** argv)
{
mmInitDefaultMem((mm_addr)soundbank_bin);

irqSet(IRQ_VBLANK, Vblank);

consoleDemoInit();

Initialize();

consoleClear();

NF_CreateSprite(0, 0, 0, 0, 96, 32);

mmLoadEffect(SFX_BIRDEKEK);

mmEffect(SFX_BIRDEKEK);

for (int i = 0; i < 120; i++)
{
NF_SpriteOamSet(0);
swiWaitForVBlank();
oamUpdate(&oamMain);
}

setBrightness(0, 0);

NF_DeleteSprite(0, 0);

NF_CreateSprite(1, 1, 8, 4, 0, 0);

mmLoad(MOD_MAINTHEME);
mmStart(MOD_MAINTHEME, MM_PLAY_LOOP);

NF_LoadTiledBg("maps/mainscreen", "main_bg", 256, 256);
NF_LoadTiledBg("maps/bottomscreen", "bottom_bg", 256, 256);
NF_CreateTiledBg(0, 3, "main_bg");
NF_CreateTiledBg(1, 1, "bottom_bg");

u8 r, g, b;
s16 cR, cG, cB;
u8 speed = 0;
u16 n = 0;

NF_FreeSpriteGfx(0, 0);
NF_UnloadSpritePal(0);

speed = 0;

for (int i = 0; i < 8; i++) { // Loop from 0 to 255 for smooth transition
for (n = 0; n < 256; n++) {
NF_BgGetPalColor(0, 3, n, &r, &g, &b);
cR = r;
cG = g;
cB = b;

cR += 25;
cG += 25;
cB += 25;
// Decrease the color components
cR--;
if (cR < 0) cR = 0;
cG--;
if (cG < 0) cG = 0;
cB--;
if (cB < 0) cB = 0;

// Update palette color
NF_BgEditPalColor(0, 3, n, cR, cG, cB);
}
NF_BgUpdatePalette(0, 3); // Update the palette

speed++;
if (speed > 1) { // Adjust this value to control the speed of the transition
speed = 0;
}

NF_SpriteOamSet(0);
NF_SpriteOamSet(1);

swiWaitForVBlank(); // Wait for vertical blank

oamUpdate(&oamMain);
oamUpdate(&oamSub);
}

while (1)
{
swiWaitForVBlank();
}

return 0;
}

btw its the MP sprite not the birdekek one
Post automatically merged:

1692328118893.png
 
Last edited by birdekek,

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
Last edited by plasturion,

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
Sometimes games use one of three background layers (one layer is background, second is midleground for paralax effect or game characters, and on top things like status bar or text window, etc. belongs to foreground) and sometimes big side bars are combined from many sprites. (if we talk about 2D engine) On that many sprites in example can be printed text font in text window. (in fact they are used as another one layer). There wasn't any improvement in sprite size comparing to previous generation GBA, but that's how it is. Backgrounds as independent instances are acting like sprites for each other, also you can use one of background as a big sprite.
 

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
Sometimes games use one of three background layers (one layer is background, second is midleground for paralax effect or game characters, and on top things like status bar or text window, etc. belongs to foreground) and sometimes big side bars are combined from many sprites. (if we talk about 2D engine) On that many sprites in example can be printed text font in text window. (in fact they are used as another one layer). There wasn't any improvement in sprite size comparing to previous generation GBA, but that's how it is. Backgrounds as independent instances are acting like sprites for each other, also you can use one of background as a big sprite.
Also how do you refrence scripts inside of other scripts because your last explanation was very vague, i was asking how to actually trigger another script from inside another one. kind of like a chain
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
triggering one script inside another one, just one function can call another one, and actually always returns back to the place where it was called. I hope you don't mean something like goto instruction, as is treated as bad practice for this language.
let's say things are simple as this:
void InitializeMore() {
three();
four();
}
void Initialize(){
one();
two();
InitializeMore();
}
main (){
Initialize();
}
...aslo if you would like to do something like this:
void InitializeMore() {
three();
four();
Initialaize();
}
void Initialize(){
one();
two();
InitializeMore();
}
main (){
Initialize();
}
I belive you end up with stack overflow error very soon.
 
Last edited by plasturion,

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
so i tried adding some headers and stuff to include another script but the console is giving me these errors
Code:
C:/STIDS/source/main.c: In function 'main':
C:/STIDS/source/main.c:161:13: warning: implicit declaration of function 'MultiplayerMatch' [-Wimplicit-function-declaration]
  161 |             MultiplayerMatch();
      |             ^~~~~~~~~~~~~~~~
multiplayermatch.c
linking STIDS.elf
C:/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld.exe: multiplayermatch.o: in function `Vblank':
C:/STIDS/source/multiplayermatch.c:19: multiple definition of `Vblank'; main.o:C:/STIDS/source/main.c:40: first defined here
C:/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld.exe: multiplayermatch.o: in function `main':
C:/STIDS/source/multiplayermatch.c:24: multiple definition of `main'; main.o:C:/STIDS/source/main.c:44: first defined here
C:/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld.exe: multiplayermatch.o:C:/STIDS/source/multiplayermatch.c:14: multiple definition of `frame'; main.o:C:/STIDS/source/main.c:8: first defined here
C:/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld.exe: main.o: in function `main':
C:/STIDS/source/main.c:161: undefined reference to `MultiplayerMatch'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/STIDS/Makefile:56: /c/STIDS/STIDS.elf] Error 1
make: *** [Makefile:164: build] Error 2

heres the rest of my code too

main.cpp

C++:
#include <nds.h>
#include <maxmod9.h>
#include <nf_lib.h>
#include <stdio.h>
#include "soundbank.h"
#include "soundbank_bin.h"

volatile int frame = 0;

void Initialize()
{
    NF_SetRootFolder("NITROFS");
    NF_Set2D(0, 0);
    NF_Set2D(1, 0);
    NF_InitSpriteSys(1);
    NF_SpriteOamSet(1);

    NF_InitTiledBgBuffers();
    NF_InitTiledBgSys(0);
    NF_InitTiledBgSys(1);

    NF_InitSpriteBuffers();
    NF_InitSpriteSys(0);

    NF_LoadSpriteGfx("ui/birdekek", 0, 64, 64);
    NF_LoadSpritePal("ui/birdekek", 0);

    NF_LoadTiledBg("maps/mainscreen", "main_bg", 256, 256);
    NF_LoadTiledBg("maps/bottomscreen", "bottom_bg", 256, 256);
    NF_LoadTiledBg("maps/msc", "bottom_select", 256, 256);
    NF_LoadTiledBg("maps/mscoff", "bottom_select_two", 256, 256);
    NF_LoadTiledBg("maps/mscon", "bottom_select_one", 256, 256);

    NF_VramSpriteGfx(0, 0, 0, false);
    NF_VramSpritePal(0, 0, 0);
}

void Vblank()
{
    frame++;
}

int main(int argc, char** argv)
{
    mmInitDefaultMem((mm_addr)soundbank_bin);

    irqSet(IRQ_VBLANK, Vblank);

    consoleDemoInit();

    Initialize();

    consoleClear();

    NF_CreateSprite(0, 0, 0, 0, 96, 32);

    mmLoadEffect(SFX_BIRDEKEK);
    mmLoadEffect(SFX_SELECT);

    mmEffect(SFX_BIRDEKEK);

    for (int i = 0; i < 120; i++)
    {
        NF_SpriteOamSet(0);
        swiWaitForVBlank();
        oamUpdate(&oamMain);
    }

    setBrightness(0, 0);

    NF_DeleteSprite(0, 0);

    mmLoad(MOD_MAINTHEME);
    mmStart(MOD_MAINTHEME, MM_PLAY_LOOP);

    NF_CreateTiledBg(0, 3, "main_bg");
    NF_CreateTiledBg(1, 3, "bottom_bg");
    NF_CreateTiledBg(1, 1, "bottom_select");

    u8 r, g, b;
    s16 cR, cG, cB;
    u8 speed = 0;
    u16 n = 0;

    int selection = 0;
    int keys;

    NF_FreeSpriteGfx(0, 0);
    NF_UnloadSpritePal(0);

    speed = 0;

    for (int i = 0; i < 8; i++) { // Loop from 0 to 255 for smooth transition
        for (n = 0; n < 256; n++) {
            NF_BgGetPalColor(0, 3, n, &r, &g, &b);
            cR = r;
            cG = g;
            cB = b;

            cR += 25;
            cG += 25;
            cB += 25;
            // Decrease the color components
            cR--;
            if (cR < 0) cR = 0;
            cG--;
            if (cG < 0) cG = 0;
            cB--;
            if (cB < 0) cB = 0;

            // Update palette color
            NF_BgEditPalColor(0, 3, n, cR, cG, cB);
        }
        NF_BgUpdatePalette(0, 3); // Update the palette

        speed++;
        if (speed > 1) { // Adjust this value to control the speed of the transition
            speed = 0;
        }

        NF_SpriteOamSet(0);
        NF_SpriteOamSet(1);

        swiWaitForVBlank(); // Wait for vertical blank

        oamUpdate(&oamMain);
        oamUpdate(&oamSub);
    }

    while (1)
    {
        scanKeys();

        keys = keysDown();

        if (keys & KEY_DOWN) {
            if (selection < 2) {
                selection++;
                mmEffect(SFX_SELECT);
            }
        }

        if (keys & KEY_UP) {
            if (selection > 1) {
                selection--;
                mmEffect(SFX_SELECT);
            }
        }

        if (selection == 1) {
            NF_DeleteTiledBg(1, 1);
            NF_CreateTiledBg(1, 1, "bottom_select_one");
        }

        if (selection == 2) {
            NF_DeleteTiledBg(1, 1);
            NF_CreateTiledBg(1, 1, "bottom_select_two");
        }

        if(keys & KEY_A & (selection == 1)) {
            MultiplayerMatch();
            return 0;
        }

        swiWaitForVBlank();
    }

    return 0;
}

multiplayermatch.cpp

C++:
#include <nds.h>

#include <stdio.h>

volatile int frame = 0;

//---------------------------------------------------------------------------------
void Vblank() {
    //---------------------------------------------------------------------------------
    frame++;
}

//---------------------------------------------------------------------------------
int main(void) {
    irqSet(IRQ_VBLANK, Vblank);

    consoleDemoInit();

    iprintf("Hee-eee");

    while (1) {

        swiWaitForVBlank();
    }

    return 0;
}

multiplayermenu.h

C:
#ifndef __MULTIPLAYERMENU_H__
#define __MULTIPLAYERMENU_H__

void MultiplayerMatch();

#endif // __MULTIPLAYERMENU_H__
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
let's say better solution here will be function like void multiplayer() instead of main() (as this one exsists already) doing some things like main loop is doing.
this is intresting:
Code:
        if(keys & KEY_A & (selection == 1)) {
            MultiplayerMatch();
            return 0;
        }
I see no point in return 0; you can't move main program instance to other one closing previous one like this.
return 0 in main() means exit the program once and for good.
you could here in main loop create something like game modes with switch - case selector and run a function declared in multiplayer() or just move main loop inside a function in other stcript file with posible return back to main menu (main() in main.c). Maybe someone else can have better ideas here.
 
Last edited by plasturion,

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
let's say better solution here will be function like void multiplayer() instead of main() (as this one exsists already) doing some things like main loop is doing.
ok, i fixed those issues, but the games just crashing now
MultiplayerMatch.c
C++:
#include <nds.h>

#include <stdio.h>

void MultiplayerMatch() {
    iprintf("Printed\n");
}

Main.c
C++:
#include <nds.h>
#include <maxmod9.h>
#include <nf_lib.h>
#include <stdio.h>
#include "soundbank.h"
#include "multiplayermenu.h"
#include "soundbank_bin.h"

volatile int frame = 0;

void Initialize()
{
    NF_SetRootFolder("NITROFS");
    NF_Set2D(0, 0);
    NF_Set2D(1, 0);
    NF_InitSpriteSys(1);
    NF_SpriteOamSet(1);

    NF_InitTiledBgBuffers();
    NF_InitTiledBgSys(0);
    NF_InitTiledBgSys(1);

    NF_InitSpriteBuffers();
    NF_InitSpriteSys(0);

    NF_LoadSpriteGfx("ui/birdekek", 0, 64, 64);
    NF_LoadSpritePal("ui/birdekek", 0);

    NF_LoadTiledBg("maps/mainscreen", "main_bg", 256, 256);
    NF_LoadTiledBg("maps/bottomscreen", "bottom_bg", 256, 256);
    NF_LoadTiledBg("maps/msc", "bottom_select", 256, 256);
    NF_LoadTiledBg("maps/mscoff", "bottom_select_two", 256, 256);
    NF_LoadTiledBg("maps/mscon", "bottom_select_one", 256, 256);

    NF_VramSpriteGfx(0, 0, 0, false);
    NF_VramSpritePal(0, 0, 0);
}

void Vblank()
{
    frame++;
}

int main(int argc, char** argv)
{
    mmInitDefaultMem((mm_addr)soundbank_bin);

    irqSet(IRQ_VBLANK, Vblank);

    consoleDemoInit();

    Initialize();

    consoleClear();

    NF_CreateSprite(0, 0, 0, 0, 96, 32);

    mmLoadEffect(SFX_BIRDEKEK);
    mmLoadEffect(SFX_SELECT);

    mmEffect(SFX_BIRDEKEK);

    for (int i = 0; i < 120; i++)
    {
        NF_SpriteOamSet(0);
        swiWaitForVBlank();
        oamUpdate(&oamMain);
    }

    setBrightness(0, 0);

    NF_DeleteSprite(0, 0);

    mmLoad(MOD_MAINTHEME);
    mmStart(MOD_MAINTHEME, MM_PLAY_LOOP);

    NF_CreateTiledBg(0, 3, "main_bg");
    NF_CreateTiledBg(1, 3, "bottom_bg");
    NF_CreateTiledBg(1, 1, "bottom_select");

    u8 r, g, b;
    s16 cR, cG, cB;
    u8 speed = 0;
    u16 n = 0;

    int selection = 0;
    int keys;

    NF_FreeSpriteGfx(0, 0);
    NF_UnloadSpritePal(0);

    speed = 0;

    for (int i = 0; i < 8; i++) { // Loop from 0 to 255 for smooth transition
        for (n = 0; n < 256; n++) {
            NF_BgGetPalColor(0, 3, n, &r, &g, &b);
            cR = r;
            cG = g;
            cB = b;

            cR += 25;
            cG += 25;
            cB += 25;
            // Decrease the color components
            cR--;
            if (cR < 0) cR = 0;
            cG--;
            if (cG < 0) cG = 0;
            cB--;
            if (cB < 0) cB = 0;

            // Update palette color
            NF_BgEditPalColor(0, 3, n, cR, cG, cB);
        }
        NF_BgUpdatePalette(0, 3); // Update the palette

        speed++;
        if (speed > 1) { // Adjust this value to control the speed of the transition
            speed = 0;
        }

        NF_SpriteOamSet(0);
        NF_SpriteOamSet(1);

        swiWaitForVBlank(); // Wait for vertical blank

        oamUpdate(&oamMain);
        oamUpdate(&oamSub);
    }

    while (1)
    {
        scanKeys();

        keys = keysDown();

        if (keys & KEY_DOWN) {
            if (selection < 2) {
                selection++;
                mmEffect(SFX_SELECT);
            }
        }

        if (keys & KEY_UP) {
            if (selection > 1) {
                selection--;
                mmEffect(SFX_SELECT);
            }
        }

        if (selection == 1) {
            NF_DeleteTiledBg(1, 1);
            NF_CreateTiledBg(1, 1, "bottom_select_one");
        }

        if (selection == 2) {
            NF_DeleteTiledBg(1, 1);
            NF_CreateTiledBg(1, 1, "bottom_select_two");
        }

        if(keys & KEY_A & (selection == 1)) {
            Multiplayer();
            return 0;
        }

        swiWaitForVBlank();
    }

    return 0;
}

void Multiplayer()
{
    MultiplayerMatch();
}
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
Not sure what kind of errors but it is required to add every definitions before main() function or at least declarations.
so void Multiplayer() should be moved up.
also multiplayer.h:
C++:
#include <nds.h>
#include <stdio.h>
void MultiplayerMatch();
multiplayer.cpp:
C++:
#include "multiplayer.h"
void MultiplayerMatch() {
    iprintf("Printed\n");
}
 
Last edited by plasturion,

birdekek

Member
OP
Newcomer
Joined
Jul 25, 2023
Messages
19
Trophies
0
Age
19
XP
45
Country
United States
Not sure what kind of errors but it is required to add every definitions before main() function or at least declarations.
so void Multiplayer() should be moved up.
also multiplayer.h:
C++:
#include <nds.h>
#include <stdio.h>
void MultiplayerMatch();
multiplayer.cpp:
C++:
#include "multiplayer.h"
void MultiplayerMatch() {
    iprintf("Printed\n");
}
did all of that but its still crashing
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
    TwoSpikedHands @ TwoSpikedHands: @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the...