XkPP Posted August 4, 2022 Share Posted August 4, 2022 function SPD() if _bsd_8 == "ue0" then gg.alert("1") end if _bsd_8 == "ue1" then gg.alert("2") end if _bsd_8 == "ue2" then gg.alert("3") end end local DO = gg.alert("Select:","a","b","c") if DO == 1 then _bsd_8 = "ue0", SPD() end if DO == 2 then _bsd_8 = "ue1", SPD() end if DO == 3 then _bsd_8 = "ue2", SPD() end so it doesn't respond (==) as I wrote above, can anyone help Link to comment Share on other sites More sharing options...
MANDO01 Posted August 4, 2022 Share Posted August 4, 2022 11 hours ago, XkPP said: function SPD() if _bsd_8 == "ue0" then gg.alert("1") end if _bsd_8 == "ue1" then gg.alert("2") end if _bsd_8 == "ue2" then gg.alert("3") end end local DO = gg.alert("Select:","a","b","c") if DO == 1 then _bsd_8 = "ue0", SPD() end if DO == 2 then _bsd_8 = "ue1", SPD() end if DO == 3 then _bsd_8 = "ue2", SPD() end so it doesn't respond (==) as I wrote above, can anyone help Delete , Like this so this should work function SPD() if _bsd_8 == "ue0" then gg.alert("1") end if _bsd_8 == "ue1" then gg.alert("2") end if _bsd_8 == "ue2" then gg.alert("3") end end local DO = gg.alert("Select:","a","b","c") if DO == 1 then _bsd_8 = "ue0" SPD() end if DO == 2 then _bsd_8 = "ue1" SPD() end if DO == 3 then _bsd_8 = "ue2" SPD() end Link to comment Share on other sites More sharing options...
darklinux Posted August 5, 2022 Share Posted August 5, 2022 Never used a comma like that before, looks like it sets the value after the call, that's why its not equal (aka nil). -- lua _bsd_8 = "ue0", SPD() -- bytes code LOADK 1 7 ; "ue0" GETTABUP 2 0 8 ; _ENV "SPD" CALL 2 1 1 ; 0 in 0 out SETTABUP 0 6 1 ; _ENV "_bsd_8" and -- lua _bsd_8 = "ue0" SPD() -- bytes code SETTABUP 0 6 7k ; _ENV "_bsd_8" "ue0" GETTABUP 1 0 8 ; _ENV "SPD" CALL 1 1 1 ; 0 in 0 out https://www.luac.nl/ Link to comment Share on other sites More sharing options...
XkPP Posted August 5, 2022 Author Share Posted August 5, 2022 12 hours ago, MANDO01 said: Delete , oh I didn't know that without commas it could work, thanks for helping Link to comment Share on other sites More sharing options...
MANDO01 Posted August 6, 2022 Share Posted August 6, 2022 On 8/5/2022 at 2:53 PM, XkPP said: oh I didn't know that without commas it could work, thanks for helping your welcome Link to comment Share on other sites More sharing options...
Question
XkPP
so it doesn't respond (==) as I wrote above, can anyone help
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.