I have the following code:

contract CheckBet is usingOraclize {
    struct Weather {
        uint curr_temperature;
        uint high_temperature;
        uint low_temperature;
    Weather weather;

function get_weather_status() payable{
    Log("Oraclize query was sent, waiting for the answer.."); 


//callback function for Oraclize
function __callback(bytes32 _myid, string _result) {
    require (msg.sender == oraclize_cbAddress());
    assign_value_to_weather[low_temperature]= parseInt(_result, 2); 

Please help me out.


If your parseInt(_result, 2) gives the right result (no idea if it does), just simply assign to the weather variable?

weather.low_temperature = parseInt(_result, 2);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.