Page 1 of 1

”Function not found”

Posted: 15 Apr 2018, 0:51
by Super Mario Player
Is there a way to call a procedure that is defined in another script?

Because each time I try to do so, I get the following error message:
Spoiler
Image

I did try to put them in a script and run it upon level start, still ain't working.

Posted: 15 Apr 2018, 1:49
by Ariinui
i think you're using 2.0 script:
https://wohlsoft.ru/pgewiki/Functions_(TeaScript)#ShowMsg

Posted: 15 Apr 2018, 2:05
by Super Mario Player
Ariinui wrote:i think you're using 2.0 script:
https://wohlsoft.ru/pgewiki/Functions_(TeaScript)#ShowMsg
Is it the name of the function that suggests this? Actually DisplayMessage is a procedure I defined in one of my scripts.

Posted: 15 Apr 2018, 2:42
by Ariinui
can you show me the level start script?

Posted: 15 Apr 2018, 3:08
by Super Mario Player
Ariinui wrote:can you show me the level start script?
Here it is:

Code: Select all

call DisplayMessage(str(String1),0)
call Debug(str(String1))


My procedure DisplayMessage was declared in my Initialize script:

Code: Select all

str(String1) = "Hi"

Script DisplayMessage(message as String, automatic as double)
   if val(MessageDisplayed)=0 then
      val(MessageDisplayed) = 1
      call BMPCreate(256,89,1,1,0,140,512,0,144,128,1,1,0,0,0,-1)
      call TCreate(Text Box - Appear,0)
      
   end if
end Script