PWADŸlocal function FRNT_Sim_Impl() local seed = P_RandomFixed() print("Seed: " .. seed) local state = FRNG.Sim_Create(seed) print("Sim_GetFixed: "..FRNG.Sim_GetFixed(state)) print("Sim_GetByte: "..FRNG.Sim_GetByte(state)) print("Sim_GetSigned: "..FRNG.Sim_GetSigned(state)) print("Sim_GetInt32: "..FRNG.Sim_GetInt32(state)) print("Sim_GetKey(999): "..FRNG.Sim_GetKey(state,999)) print("Sim_GetZeroToLimit(-999): "..FRNG.Sim_GetZeroToLimit(state,-999)) print("Sim_GetApproxNormal: "..FRNG.Sim_GetApproxNormal(state)) local shuf_tester = {1,2,3,4} FRNG.Sim_Shuffle(state, shuf_tester) print("Sim_Shuffle({1,2,3,4}): "..table.concat(shuf_tester, ',')) print("Sim_GetRange(-61,99): "..FRNG.Sim_GetRange(state,-61,99)) print("Sim_GetInt32Array(5): "..table.concat(FRNG.Sim_GetInt32Array(state, 5), ',')) FRNG.Sim_Destroy(state) end local function FRNT_Sim() if not FRNG then print "You need to load FlowerRNG first!" end print("Testing FRNG.Sim...") local results = {pcall(FRNT_Sim_Impl)} if results[1] then print("No errors!") else print("Error: "..results[2]) end end COM_AddCommand("frng_test_sim", FRNT_Sim) “LUA_FRNT