Jump to content
MakeWebGames

Recommended Posts

Posted

This doesn't work:

      $userToMake = @new user();
      $rand = mt_rand(1,10000);
      $makeUser = $userToMake->makeUser(
        $bot, 
        $prefix . $rand .  $email,
        $pass,
        2,
        1
        );
        
      $rand = mt_rand($minTime, $maxTime);
      $rand = $rand * mt_rand(10,60);
  
    $loc = getRandLoc();
    $rankID =77;

//works

    $userToMake->set("US_location", $loc["id"]);

//doeant work
    
   $userToMake->set("U_userLevel", $rankID);

 

But this works

      $userToMake = @new user();
      $rand = mt_rand(1,10000);
      $makeUser = $userToMake->makeUser(
        $bot, 
        $prefix . $rand .  $email,
        $pass,
        2,
        1
        );
        
      $rand = mt_rand($minTime, $maxTime);
      $rand = $rand * mt_rand(10,60);
  
    $loc = getRandLoc();
    $rankID = 77;

    $userToMake->set("US_location", $loc["id"]);


    $rec = $db->prepare("
      SELECT * FROM
        users
      ORDER BY U_id
      DESC LIMIT 1;
    ");
    
    $rec->execute();
    $rec = $rec->fetchObject();
    
    $update = $db->prepare("
       UPDATE 
         users
      SET
        U_userLevel= :roleID
      WHERE
        U_id = :userID
     ");
      
    $update->bindParam(":roleID", $rankID);
    $update->bindParam(":userID", $rec->U_id);
    $update->execute();

 

The problem is set will not set my new users userLevel for some reason. I spwnt a few days until I was like I'll go the non-GL standard eat.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...