Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A Big Mess with "pan_setdigits" #412432
11/27/12 12:49
11/27/12 12:49
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
When I supply a non-pointer variable to pan_setdigits ,it does not work.
So does pan_setdigits last parameter requires a pointer only??


If so,
I need a solution for tis!!

I have a struct UserProfile (Many might kno ,I had posted tis several times).
All of the elements in the stuct are non-pointers.

How do I make it work under pan_setdigits??

Last edited by Yashas; 11/27/12 12:53.

Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: A Big Mess with "pan_setdigits" [Re: Yashas] #412433
11/27/12 12:53
11/27/12 12:53
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
pan_setdigits(PANEL*, var num, var x, var y, STRING* format, FONT* font, var factor, var* pv)

Did you realize the var *pv?
It only takes a POINTER.

Last edited by Ch40zzC0d3r; 11/27/12 12:54.
Re: A Big Mess with "pan_setdigits" [Re: Ch40zzC0d3r] #412439
11/27/12 14:10
11/27/12 14:10
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Lite-C usually references variables if required. If it doesn't work, just the reference operator &.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: A Big Mess with "pan_setdigits" [Re: WretchedSid] #412463
11/27/12 16:40
11/27/12 16:40
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
The prob is I use ActiveProfile.VARIABLE as an argument to pan_setdigits.My ActiveProfile stucture elements are all non-pointers.

If I make a all pointers I wud hav to change almost 2k lines and in edtition some pointers stuff again.

I just came up here to ask if there was any other solution??


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: A Big Mess with "pan_setdigits" [Re: Yashas] #412464
11/27/12 16:47
11/27/12 16:47
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
It does not matter if they are pointers or not in the first place. The & operator will return the variables address.


Always learn from history, to be sure you make the same mistakes again...
Re: A Big Mess with "pan_setdigits" [Re: Uhrwerk] #412588
11/29/12 16:50
11/29/12 16:50
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
I gave "&ActiveProfile.VARIABLE" as the parameter ,I get "Syntax Error"
and I also tried "ActiveProfile.&VARIABLE" ,I get "ActiveProfile is not a keyword" or something.

??

Or cud you give me an example using the address of operator??

THanks


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: A Big Mess with "pan_setdigits" [Re: Yashas] #412598
11/29/12 18:08
11/29/12 18:08
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You have to to pay attention to operator precedence!

&(ActiveProfile.VARIABLE)


Always learn from history, to be sure you make the same mistakes again...
Re: A Big Mess with "pan_setdigits" [Re: Uhrwerk] #412637
11/30/12 11:44
11/30/12 11:44
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
digits(320,40,4,DialogSubText,1,&(ActiveProfile.BPI));

It did not work ;I get an error "Syntax Error: & Invalid Character &"


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: A Big Mess with "pan_setdigits" [Re: Yashas] #412649
11/30/12 13:36
11/30/12 13:36
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
the parameters you're giving are wrong:

digits(x, y, format, font, factor, var);
pan_setdigits(PANEL*, var num, var x, var y, STRING* format, FONT* font, var factor, var* pv);


POTATO-MAN saves the day! - Random
Re: A Big Mess with "pan_setdigits" [Re: Kartoffel] #412656
11/30/12 16:51
11/30/12 16:51
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
ops, sorry!! Frgt that digits can work with non-pointers grin tongue


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1