Talk:Logic script: Difference between revisions
Pansong291ps (talk | contribs) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
In that case i feel we should add this information the the main page. Stating that the list could be extended, but it would not work. --[[User:MrFunreal|MrFunreal]] ([[User talk:MrFunreal|talk]]) 14:29, 6 September 2017 (UTC) | In that case i feel we should add this information the the main page. Stating that the list could be extended, but it would not work. --[[User:MrFunreal|MrFunreal]] ([[User talk:MrFunreal|talk]]) 14:29, 6 September 2017 (UTC) | ||
== How can I invoke script function with string params? == | |||
Never try to pass string parameters to a script function with ''RunScriptCode''. | |||
So what is the solution? Is there anybody know it? | |||
Does the VMF file have quotation mark escape characters? |
Latest revision as of 04:26, 27 February 2022
extended array
Are you sure the arrays can be extended? I turned smart edit off and added more arrays, so that i end up with 36 (i still need more).
Now everytime the logic_script has to do anything, i get the following error:
AN ERROR HAS OCCURED [the index '16' does not exist]
CALLSTACK
*FUNCTION [StopAllMusic()] f:/programme/steam/steamapps/common/left 4 dead 2/tumtara/scripts/vscripts/TUMTaRA_Music.nut line [386]
*FUNCTION [Play_Snd_alarm3()] f:/programme/steam/steamapps/common/left 4 dead 2/tumtara/scripts/vscripts/TUMTaRA_Music.nut line [319]
*FUNCTION [main()] InputRunScript line [1]
LOCALS
[this] TABLE
[this] TABLE
[vargv] ARRAY
[this] TABLE
According to the callstack the game knew what it was meant to do, but it just wouldn't do it because appereantly only the indexes 0-15 exist.
Even after i edited the "base.fdg" and manually expanded the available slots to 100 (screenshot) it still would not work.
So i'm pretty sure you can not expand the arrays past 15 --MrFunreal (talk) 14:58, 5 September 2017 (UTC)
Indeed, logic_script cannot get more values. That error is from the Squirrel script, not finding value 16. You need to edit the game code to allow more. --TeamSpen210 (talk) 11:22, 6 September 2017 (UTC)
In that case i feel we should add this information the the main page. Stating that the list could be extended, but it would not work. --MrFunreal (talk) 14:29, 6 September 2017 (UTC)
How can I invoke script function with string params?
Never try to pass string parameters to a script function with RunScriptCode.
So what is the solution? Is there anybody know it?
Does the VMF file have quotation mark escape characters?