Deep Bot - Twitch Streamer Assistant

Deep Bot => Help/Support => Topic started by: chr0m on September 25, 2016, 02:15:02 AM

Title: No commands in if command ----AGAIN---
Post by: chr0m on September 25, 2016, 02:15:02 AM
i dont know why again, but in a @if@ command the matchresult cant be a command like readfile or a own !command... again! this was in a earlier version too. why ever, this is very hard shit :(
why? fix? or i do something wrong? :o

plz need an answer asap...
Title: Re: No commands in if command ----AGAIN---
Post by: chr0m on September 25, 2016, 05:09:33 PM
example:

Quote
@if@[!checkUserSpecialPermission @user@||true||he has permission!]

thats what it returns:
true

gg wp no re GZ...
why is this again in the current version?? in last version it worked....
Title: Re: No commands in if command ----AGAIN---
Post by: TheNumbLock on September 26, 2016, 12:28:48 AM
Added to bug list. But not too sure what exactly the issue is. If you have an example, it would help.
Title: Re: No commands in if command ----AGAIN---
Post by: chr0m on September 26, 2016, 03:09:49 AM
hä? i wrote the example!?

ok here again, more in detail:

i have this command:
!checkSpecialPermission
commandcontent: @if@[@target@||chr0m||true||false]
what it makes: if @target@ is chr0m, it returns "true". otherwise "false".

Now the bug in this command:
@if@[!checkSpecialPermission @user@||true||it works!]]
when i call this command, the checkSpecialPermission will called with chr0m and gives true back. so the correct return must be "it works!". but the return is "true".

sry but this shit bug comes all 2-3 versions again back... that really pissed me hard. why there are no unittests in the development for this issue???
Title: Re: No commands in if command ----AGAIN---
Post by: ExpertsOnline on September 28, 2016, 08:32:28 AM
Sorry - Your second statement usage of @if@ is incorrect. You only have 3 parameters instead of 4.

Additionally, you cant embed a command in the if statement hoping to get the result of that command back to the original command. This functionality never existed.
All commands are executed to their respective output streams (Twitch/Whispers or Discord), they do not operate like functions and return the data to calling commands.

You will need to code the first if into the second if statement, or chain them.

Title: Re: No commands in if command ----AGAIN---
Post by: chr0m on October 01, 2016, 12:23:10 AM
i used the command, that is explain here:
http://wiki.deepbot.tv/custom_commands
this is on this site:
@if@[data||matchWith||matchedResult] = Data is returned if match fails.
then this is not correct?
Title: Re: No commands in if command ----AGAIN---
Post by: chr0m on October 01, 2016, 12:30:30 AM
Additionally, you cant embed a command in the if statement hoping to get the result of that command back to the original command. This functionality never existed.
All commands are executed to their respective output streams (Twitch/Whispers or Discord), they do not operate like functions and return the data to calling commands.
this is not true! i used that many times before this new version. and it worked!

this is one of our commands we used many months, till the last update. in the last update, the if command is broken! there is no workaroung to fix this by changing the command!
Code: [Select]
@if@[@readfile@[C:\DeepBot - Twitch Streamer Assistant\SetVip\userPointsOk.txt]||1||!giveUserPointsStartOk @target@||!giveUserPointsStartWrong @target@[4]]
Title: Re: No commands in if command ----AGAIN---
Post by: chr0m on October 03, 2016, 03:13:47 AM
hello???
Title: Re: No commands in if command ----AGAIN---
Post by: TheNumbLock on October 03, 2016, 04:05:37 AM
Not sure what is in the .txt files. Hard to figure out what the issue is.
Title: Re: No commands in if command ----AGAIN---
Post by: ExpertsOnline on October 04, 2016, 09:32:08 PM
Please could you come onto our discord server so it is easier to discuss your issue? Hard to debug such issues over non-realtime forums replies.  The link is: http://discord.deepbot.tv

Thanks,
Experts