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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 1,271 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TEXT not working at all? #261356
04/17/09 06:09
04/17/09 06:09
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
I take TEXT* straight from the manual implement it into my script. and it dosen't work? It tell me it doesn't know what "TEXT*" is. This frustrating...

Help please?


-Johnny Thrash
Re: TEXT not working at all? [Re: Metal_Thrasher] #261357
04/17/09 07:03
04/17/09 07:03
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
is it lite-c or c-script u using ?


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: TEXT not working at all? [Re: delinkx] #261362
04/17/09 07:17
04/17/09 07:17
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If you are using c-script, drop the asterisk, its lite-c only.

If you are using lite-c, make sure SED has saved your source files as C and not WDL.
It is easy to not notice...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: TEXT not working at all? [Re: EvilSOB] #261364
04/17/09 07:27
04/17/09 07:27
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
yeps. c-script calls objects directly but lite-c uses pointers.

from the manual:

Quote:

In C-Script, we had to differentiate between object definitions (PANEL mypanel = {... }) and object pointers (PANEL* mypanelpointer = mypanel;). In lite-C, objects are always pointers. So it's now PANEL* mypanel = { ... }.




A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: TEXT not working at all? [Re: delinkx] #261379
04/17/09 09:53
04/17/09 09:53
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Thank a billion dudes.
You'd think my stupid ass would have figured that one out.
Thanks again...
although i have another stupid question for you at this point. How do I assign the value of a variable to a string. For instance displaying the amount of the player's health stored in a variable.


-Johnny Thrash
Re: TEXT not working at all? [Re: Metal_Thrasher] #261381
04/17/09 10:23
04/17/09 10:23
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
for c-script i guess should be like this:

Code:

STRING mystring = "     ";
var myvariable = 123;
str_for_num(mystring, myvariable); 
	



A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: TEXT not working at all? [Re: Metal_Thrasher] #261382
04/17/09 10:25
04/17/09 10:25
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Beware the number and placement of brackets! Important!
str_cpy((panelname.pstring)[linenumber],""); //clear existing content.(even first time)
str_cat_num((panelname.pstring)[linenumber], "%.3f", thenumber); //display number to 3 decimal places.


NOTE: not sure if this is c-script friendly or not. I live lite-c and my WDL is shoddy smile


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: TEXT not working at all? [Re: EvilSOB] #261480
04/17/09 19:19
04/17/09 19:19
Joined: Jul 2002
Posts: 2,002
Europe
ShoreVietam Offline
Expert
ShoreVietam  Offline
Expert

Joined: Jul 2002
Posts: 2,002
Europe
Never saw something like this in C-Sript, there are no type conversions in C-Script since there is only one type.

To avaid str_for_num() printing out all 3 numbers after the comma pass the variable through the int() function.

Last edited by ShoreVietam; 04/17/09 19:20.

My project Schlacht um Kyoto - Das Samurai Browsergame! (sorry, german only)

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