Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

#1 2022-01-15 13:54:58

New member
Registered: 2022-01-13
Posts: 2

Resolved: Old style C declaration. IGNORED

Hello everyone!

[EDIT]: resolved (by Toxa! thanks!), I didn't declare the variables in the right place! Thanks!

I'm new here, the usual, interested in making gameboy games, have experience in coding but not the c language (a little rusty). Thank you all for this place existing. So I've been having an issue when compiling, it keeps giving me this error:


main.c:8: error 7: Old style C declaration. IGNORED 'pause'
main.c:22: error 101: too many parameters 
main.c:28: error 101: too many parameters
First line mainly, the other two are just when I call that function 'pause'.

The error message comes from SDCC but I'm in way over my head here, although you will see the code is very simple. I was actually doing the « GBDK Joypad Tutorial (program 2) » on this very website: link (and tweaking it to try & get rid of the delay function). I tried removing the for loop and put a while instead, same issue.

Here's the entire app:


#include <stdio.h> // include this file for the printf() function
#include <gb/gb.h> // include this file for Game Boy functions
#include <stdint.h> // Include this file to use std types such as uint8_t

uint8_t i;
uint8_t loops;

void pause(loops){
    for(i = 0; i < loops; ++i){

void main(void){


        printf("Please press A?\n");
        printf("You pressed A!\n\n");
        printf("Hold down LEFT?\n");
        printf("You're holding down LEFT!\n");
        printf("You've released LEFT!\n\n\n");

Anyone able to help in any way? Thanks in advance!

Last edited by nitro2k01 (2022-01-21 23:18:31)



#2 2022-01-21 14:21:57

Registered: 2019-03-04
Posts: 124

Re: Resolved: Old style C declaration. IGNORED

Parameters passed to a function need to have a [ype:


void pause(uint8_t loops) {



Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson