English
Forum & Help

Proc - appeal / something missing

 
- 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
 
04/03/16  
 



 
- 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)!!! 
 
04/06/16  
 




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
 
04/07/16  
 




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 X3
System: 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
 
04/07/16  
 




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 X3
System: 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
 
04/07/16  
 




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.
 
04/07/16  
 




Erasmus.Herold
have the then time so umgesetzt and nachgebildet.
lovely!!!
// globale variables
glob = 50
print "1: (50): " + glob
meineProc
print "2: (100): " + glob

proc meineProc

    global glob
    print "3: (50): " + glob
    glob = 2 * glob
    print "4: (100): " + glob

endproc


Thx - Erasmus
 
04/07/16  
 




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
 
04/08/16  
 



@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.
 
04/08/16  
 



 
- 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
 
04/08/16  
 



therefore I had the example with Global already so chosen:  [...] 
 
04/08/16  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

13.456 Views

Untitledvor 0 min.
Torsten Rümker05/10/16
Uwe Lang04/17/16
Julian Schmidt04/13/16
GDL04/12/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie