Menu

#812 [Scripting] Error in including multiple scripts

Next_Nightly
fixed
Bug_Report
2019-04-14
2019-04-07
bluehazzard
No

In squirrel scripts it is not possible to include multiple scripts with relative paths.
To test it extract the attached zip file and run the main.script.
You can see in the Codeblocks debug log that the second included script can not be loaded

1 Attachments

Discussion

  • bluehazzard

    bluehazzard - 2019-04-07

    Here is a patch with a fix.
    Instead of using a single variable for tracking the current script, use a stack based vector to track the location...

     
  • Teodor Petrov

    Teodor Petrov - 2019-04-08
    1. Use !empty() instead of size()>0
    2. Space after if
    3. m_CurrentlyRunningScriptFile is a bad name now. Rename to something like m_ScriptFileStack
    4. TrustCurrentlyRunningScript doesn't look good. Shouldn't you call TrustScript only if you have something in the stack
    5. Please add doxygen comment explainging why and how the stack is used
     
  • bluehazzard

    bluehazzard - 2019-04-14

    here is the next version of the patch. Thank you for review again

     
  • Teodor Petrov

    Teodor Petrov - 2019-04-14

    Looks good. ;)

     
  • bluehazzard

    bluehazzard - 2019-04-14
    • status: open --> fixed
    • Milestone: Undefined --> Next_Nightly
     
  • bluehazzard

    bluehazzard - 2019-04-14

    Fixed in revision: 11627

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.