Cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger with Method

Pioneer
Pioneer

Hallo ,

 

i write a small program to test the trigger function. Using trigger i want to call a method in every minute. And by the method i want to write the vaule of a gloable varable in a table. (In furture, i will read the value of an attributte of transporter and write it in table.)  I get an error in simtalk:trigger.PNG

 It seems that none variable can be used in method.... WhySmiley Sad

1 REPLY

Re: Trigger with Method

Phenom
Phenom

Please read,

 

the method caller is handing over  2 string parameters !

 

 

Unbenannt.PNG

 

 

this code works

 

 

param str1, str2 :string

print "[",str1,"]","[",str2,"]"

variable:=variable+1

Tablefile["Time",variable]:=EventController.SimTime
Tablefile["number",variable]:=variable