# 0121: Expected function's static address

Compiler expected a static address of a [foreign function](https://docs.sannybuilder.com/language/functions#foreign-functions) but found something else.

If the function address is known ahead of time, it can be included in the function definition so the compiler can use this address, when you call the function. It is an error to have a stray comma without an address:

```pascal
function CStats__GetStatType<cdecl,>(statId: int): int // error: Expected function's static address, found >.
```

#### Possible solutions:

* check documentation on foreign function syntax and provide the address inside angle brackets:

```pascal
function CStats__GetStatType<cdecl,0x558E30>(statId: int): int // static foreign function
```

* If the address is not known at compile time and can only be found in game, the address can be omitted:

```pascal
function CStats__GetStatType<cdecl>(statId: int): int
```

This function can only be called using a function pointer variable:

```pascal
CStats__GetStatType method // define a pointer to function Destroy
...
method = 0x400000 // function is located at 0x400000
int value = method(0xDEADD0D0) // call function using the pointer
```
