%TempVariable% is is not working properly #272


  • Defect
Open
  • OwnMakesChannel created this issue May 3, 2021

    I try to use %TempVariable% instead of using %PlayerData% (because of a Bug), but %TempVariable% is not working in 90% cases.

    Code:
    execute_mode: FROM_ANOTHER_COMMAND
    type: RUN_COMMAND
    runcmd:

    #arg1 = 3; #arg2 = 600; $PlayerData%level% = 2
    - '$Script$%if%$PlayerData%level%<$arg1<and>%quests_player_quest_points%<$arg2'
    - '%TempVariable%tmpLevel2=$arg1'      #tmpLevel2 is expected 3 and is 3
    - '%TempVariable%tmpLevel2-2'     #it is not subtracting anything
    - '$text$tmpLevel2 das -2'        #tmpLevel2 is still 3
    - '$text$$PlayerData%level% Level'
    - '$Script$%PlayerData%level-tmpLevel2'      #it is not subtracting anything
    - '$delay$'          #because it has to connect to the sql server and it otherwise would take the old not subtractet value
    - '$text$$PlayerData%level% so viele Fähikeitenpunkte'
    - '$Script$%PlayerData%level*3'
    - '$delay$'
    - '$text$tmpLevel2'
    - '$text$$PlayerData%level% Fähigkeitenpunkte'
    - '$Script$%PlayerData%fähigkeitenPunkte=$PlayerData%level%'
    - '$Script$%PlayerData%level=$arg1'
    delaytimer: 1

     

     

    The Bug in %PlayerData% is, that it has to connect to the SQL server and I have to use a delay between all changing operations.

     

  • OwnMakesChannel added a tag Defect May 3, 2021
  • ivanfromitaly posted a comment May 5, 2021

    I've fixed the TempVariables, about the playerdata i don't know if i can do something without freezing the server or the command, point is, the plugin has to wait the response from mysql, and all this is done in the main server thread, it's synced. That would mean everything freeze.


To post a comment, please login or register a new account.