question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

$if function never worked as it should, and that's a problem

See original GitHub issue

Type

  • Functions: $if
  • Callbacks: <Callback Name>
  • Handlers: <Handler Type>
  • Others: ______

Code used:

fix the $if functions. 
actually if executes before all code, and that breaks the main function of if! check variables!

example:

{
$get[o] 
$if[$get[i]==1]

$let[o;yes]
$else
$let[o;no]
$endif

$let[i;1] 
}

in this case it should return "yes", but it returns "no", as the variable "i" has not yet been stored!

More:

  • Aoi.js version: 4.x+
  • Node.js version: v14
  • Operating system: any

Screenshots (If any): https://cdn.discordapp.com/attachments/849899836530884610/865574166475964467/unknown.png

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
USERSATOSHIcommented, Aug 5, 2021

hmm I was thinking of that too

ig I will try that

0reactions
Lerefcommented, Aug 25, 2021

If statement function will be improved in v5.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IF FUNCTION ISN'T WORKING NO MATTER HOW SIMPLE ...
Hi, I was trying to use the IF function and it wasn't working so i tried to make it as simple as possible...
Read more >
microsoft excel - =if() function is not working like it should be
Troubleshoot the formula step by step. Start with a simple. =IF(F1>0,TRUE,FALSE). and copy down. If the result shows TRUE for all rows, then...
Read more >
Excel Formulas: Using the IF Function - GCFGlobal
The IF function can look at a value in a cell to see if it meets a basic condition (in our example, if...
Read more >
Excel IF Function and IF Example - Contextures
How to Use Excel IF Function Examples. Use the Excel IF function when you want to test something, and show one result if...
Read more >
How to write Excel IF Function Statements
In this tutorial we're going to explain how to use the Excel IF function (also known as IF Statement), and look at a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found