> For the complete documentation index, see [llms.txt](https://docs.sannybuilder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sannybuilder.com/troubleshooting/errors/0123.md).

# 0123: A 'thiscall' function requires a pointer

Compiler found a [foreign function](/language/functions.md#foreign-functions) declaration with `thiscall` calling convention, but didn't find a required argument for the function.

`thiscall` functions are methods of a class, and by definition work with many instances of that class. They must have at least one argument that will identify the instance on which this method is called. Imagine a method `Destroy` of class `Car`:

```swift
function Car_Destroy<thiscall,0x0C0DE000>()
```

Without an instance argument it is unclear what particular car needs to be destroyed.

#### Possible solutions:

* define a parameter of type `int` in the function declaration:

```swift
function Car_Destroy<thiscall,0x0C0DE000>(struct: int)
```

When calling this method, you must also provide a valid argument:

```swift
int car_address = GET_VEHICLE_POINTER myCar
Car_Destroy(car_address)
```
