/addflags is an alias, is that what you're meaning to call? If so, you need to use call_alias instead of run. Also, you should use the updated syntax, which is much easier to read:

```php
*:/cregion $name $owner = >>>
        if(array_contains_ic(sk_all_regions(pworld()), $name)){
                msg(color('RED').'That region is already defined. Use redefine instead')
        } else {
                run('/region define '.$name.' '.$owner)
                call_alias('/addflags '.$name)
        }
<<<
```