| |
|
|
- Page 1 - |
|
Erasmus.Herold | Hallöchen ...
I call supra in the program my procedure "Spielfigur" simply with their names on. under standing following code.
proc Spielfigur (grid_mitte, position) gui.background [grid_mitte 3, position] rgb 255 255 0 endproc
in this Grid results no Einfärbung. set I The gui.background... to supra (without procedure) functions it. probably make I a Error in the Calling the variables at PROC?
Greeting - Erasmus |
|
|
| |
|
|
|
| |
|
- Page 1 - |
|
HofK | so functions it:
since a little while ago have I again DSL - completely ungewohnt to almost three weeks. there could I time again The IDE Call! (vgl. hofk.de)!!! |
|
|
| |
|
|
|
Erasmus.Herold | functions splendid. thanks. means need I with Infinity-Profan a Variablennamen, circa into procedure to go and the data To transfer, but a others within this routine?
Folgefrage: If I but now one Event in a Procedur request (proc event id data), z.B. it has someone on the screen clicked, so is it slight with Print one "Hallo" or "runter" To write. what but, if I in this Zuge too another Variable raise wants?
detail code-statement:
if (id >= 200) AND (id <= 201) AND (data.y > (gui.height() - gui.height() / 10)) print "down" position_gelenkt = position_gelenkt + 1 if (position_gelenkt > 24) position_gelenkt = 24 endif print "Pos: " + position_gelenkt endif
Statement:
clicking one under on the screen (The last 10%) appear "runter". no trouble. but "position_gelenkt" won't mitgenommen, remaining always empty.
Greeting Erasmus |
|
|
| |
|
|
|
Michael W. | The Variable ought to then outside the Proc laid out and naturally too with a Startwert vorbelegt go.
therefore is the Variable then numerisch and becomes too changed. |
|
|
| XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 04/07/16 ▲ |
|
|
|
|
Erasmus.Herold | so I had the outside definiert: position_gelenkt = 13
... but the 13 come properly in the EVENT PROC not on.
my PROC sees so from
proc event id data .... (see supra) endproc
Thanks and Greeting Erasmus |
|
|
| |
|
|
|
Michael W. | OK, if The Event-procedure bockig is and no global variables recognize, then would I simply sheer. set the raise in a Own Proc and call these within IF on.
'in the Event-Proc if ... runter_proc() endif
If the then neither functions, then is there one Käferchen found. Weckglas on it and on David Waiting... |
|
|
| XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 04/07/16 ▲ |
|
|
|
|
Erasmus.Herold | Very coole idea, I will testing and login me again.
thanks - Erasmus |
|
|
| |
|
|
|
HofK | time always whom View source as such with the Dreieck down next to Posting Font Smillies format. then are too more Source no trouble and it'll deutlicher where the trouble lying.
Hab' the time supra as an afterthought so displayed!
variables from the Hauptprogramm can directly in the procedure benefit, if one tappt im dunkeln with the commands global in the procedure as globale variables ausweist. otherwise commit one tappt im dunkeln when calling the procedure with their global names. with the Prozedurdefinition ought to one then a slight abweichenden names use. the increased The Übersichtlichkeit in the program.
the chapter 3 Procedures & Include 3.1 Procedures define and Call in the InfinityProfanBuchBeta is generally yet validly, time reinschauen and thereby but mind, that by the new Syntax the var wegfällt, for but with Use globaler variables in the procedure now these in the Prozedurdefinition behind global aufgeführt go must. |
|
|
| |
|
|
|
Erasmus.Herold | have the then time so umgesetzt and nachgebildet. lovely!!!
Thx - Erasmus |
|
|
| |
|
|
|
Erasmus.Herold | Nachtrag: Related to the GLOBAL has me very weitergeholfen, circa now any variables-values in a procedure To take.
thanks and closed.
Erasmus |
|
|
| |
|
|
|
| @Erasmus:
Perhaps yet the hint circa Use I really in Infinity anhand one example:
it rewards itself means Globale or. "Programmvariablen" in Arrays with OOP-Klassenschreibweise To to pack, circa in Procedures only The "Klasse" by Global import To must about instead of "20" globale variables.
its but too from visibility arr.serialize interestingly The own variables tidy in "Klassen" To to pack, there one so in a Slip a Vielzahl of Information serialisieren can about to that Save or. to that Übermitteln.
Michael W. (07.04.2016)
OK, if The Event-procedure bockig is and no global variables recognize, then would I simply sheer.
the ought to not the case his, Proc Event "kann" "global" How any others Procs too. |
|
|
| |
|
|
| |
|
- Page 2 - |
|
|
Erasmus.Herold | => ... only The "Klasse" by Global import To must about instead of "20" globale variables.
this is the Tipp of the day. thanks, the power it slight.
Greeting Erasmus |
|
|
| |
|
|
|
| therefore I had the example with Global already so chosen: [...] |
|
|
| |
|
|