Jump to content

Nevermind


ItHadToComeToThis
 Share

You are about to reply to a thread that has been inactive for 1513 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

While I'm (relatively) versed in PHP (not as comfortable with SQL queries), it's pretty hard to figure this out since I can't inspect/test any of this easily.

One thing that sticks out to me though, is that in all of your queries, you assign "$col={$stats}". Is the dollar-sign intentional and actually in the column name? If it's intentional, why? What does rq("database"); return? And shouldn't the query at least be "{$col}={$stats}"?

Edited by Wulfie Reanimator
Link to comment
Share on other sites

The dollar sign in PHP is how you declare a variable as far as I know. $variable = some value

$col = rq("database"); is something I need to change, its actually the column name to be modified

So the LSL script sends a value pair of "database" as like a key and then a value of say "mainStats"

Then in the PHP script its assigned to the variable $col and then that variable is used in place of the column name further down

Edited by ItHadToComeToThis
Link to comment
Share on other sites

24 minutes ago, ItHadToComeToThis said:

The dollar sign in PHP is how you declare a variable as far as I know. $variable = some value

$col = rq("database"); is something I need to change, its actually the column name to be modified

Right, I was just confused by the inconsistency of that one variable and forgot you can either have the curly braces around it or not. (Depends if it's just a basic variable or a more complex expression.)

Does your database have a limit on the content length? Eg. varchar(18) or something. The query itself looks correct to me. Have you tried updating the column with values other than "N/A" as a test?

Edited by Wulfie Reanimator
Link to comment
Share on other sites

17 hours ago, ItHadToComeToThis said:

Never mind

integer tired;

function nevermind()
{
   llPlayAnimation("stretch");
   llWhisper(0, "/me yawns");
   llTriggerSound("yawn", 1.0);
   llSleep(15.0);
   llPlayAnimation("lay down");
   llSleep(5.0);
   llWhisper(0, "/me whispers Nevermind!");
   llPlayAnimation("snooze");
   llTriggerSound("zzzzz", 1.0);
}

default()
{
   touch_start(integer num)
   {
      if(llDetectedKey(0) == llGetOwner())
      {
         if (tired = !tired)
            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
         else
         {
            if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)
               llStopAnimation("snooze");
         }
      }
   }

   run_time_permissions(integer perms)
   {
      if (perms & PERMISSION_TRIGGER_ANIMATION)
         nevermind();
   }
}

😺

  • Like 1
  • Haha 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1513 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...