Changeset 198 for trunk/src/lua/lua_aux.cc
- Timestamp:
- 08/11/13 17:19:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lua/lua_aux.cc
r180 r198 95 95 if ( dice < 1 ) luaL_argerror( L, 1, "die count lower than 1!" ); 96 96 if ( sides < 1 ) luaL_argerror( L, 2, "side count lower than 1!" ); 97 lua_pushnumber( L, nv::random::get().dice( dice, sides) );97 lua_pushnumber( L, nv::random::get().dice( static_cast< nv::uint32 >( dice ), static_cast< nv::uint32 >( sides ) ) ); 98 98 return 1; 99 99 } … … 111 111 int arg1 = luaL_checkinteger( L, 1 ); 112 112 if ( arg1 < 1 ) arg1 = 1; 113 lua_pushunsigned( L, nv::random::get().urange( 1, arg1) );113 lua_pushunsigned( L, nv::random::get().urange( 1, static_cast<nv::uint32>( arg1 ) ) ); 114 114 } 115 115 else … … 126 126 static int nluaaux_math_randomseed( lua_State* L ) 127 127 { 128 nv::random::get().set_seed( static_cast< nv::uint32 >( L, 1 ) );128 nv::random::get().set_seed( lua_tounsigned( L, 1 ) ); 129 129 return 0; 130 130 }
Note: See TracChangeset
for help on using the changeset viewer.