]> git.scottworley.com Git - planeteer/blobdiff - planeteer.go
UI: Explain required usage when run without args
[planeteer] / planeteer.go
index cf68301949b891975e8d8b12a042bf153bc6d81f..67a843dd400c9ca3d8e708af48d0850442b91c4f 100644 (file)
@@ -426,6 +426,7 @@ func CellValue(data planet_data, dims []int, table []State, addr []int) int32 {
                                }
                        }
                }
+               other[Traded] = addr[Traded]
        }
 
        /* Buy a Device of Cloaking */
@@ -647,6 +648,10 @@ func IndexCommodities(m *map[string]Commodity, start_at int) (map[string]int, []
 
 func main() {
        flag.Parse()
+       if *start == "" || *funds == 0 {
+               print("--start and --funds are required.  --help for more\n")
+               return
+       }
        if *cpuprofile != "" {
                f, err := os.Create(*cpuprofile)
                if err != nil {