Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, dBc), 18,430 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
strange problem - any ideas? #241227
12/14/08 23:00
12/14/08 23:00
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
STRING* sTitle = "";
STRING* sTitlt = " ";
STRING* namest = "na";

When I do a debug run, the first line is accepted, but when I put anything between the quotes, it errors with invalid character.
The syntax is fine I think - so why the error?

Re: strange problem - any ideas? [Re: kiamonster] #241228
12/14/08 23:05
12/14/08 23:05
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
Do you declare the strings inside a function?
Only global string declaration is ok with this syntax.
For declaring inside a function the follow syntax should be used.
Code:
function my_func()
{
  STRING* namest;
  namest = str_create("na");
}



Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: strange problem - any ideas? [Re: HPW] #241231
12/14/08 23:17
12/14/08 23:17
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
Thanks for the reply HPW
This is a global string or it should be!!!
It is in a script which only defines data items - no functions,


Last edited by kiamonster; 12/14/08 23:27.
Re: strange problem - any ideas? [Re: kiamonster] #241233
12/14/08 23:30
12/14/08 23:30
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
The syntax is correct for Lite-C (filename.c or filename.h) and global declaration.
Maybe it's an engine bug with the warn_level you use? I use warn_level = 1;
But it could also a syntax problem with a include before your declaration. Maybe somewhat like commentation at the end of a file or a include of a empty file. This is not allowed.

Last edited by HPW; 12/14/08 23:31.

Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: strange problem - any ideas? [Re: HPW] #241235
12/14/08 23:34
12/14/08 23:34
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
Do you also include in the first line of your main script one of this lines?
#include <acknex.h> // Pure Mode
or
#include <litec.h> // Legacy Mode


Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: strange problem - any ideas? [Re: HPW] #241236
12/14/08 23:47
12/14/08 23:47
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
Thanks again HPW

I use acknex.h

Howecer, just moved it elsewhere - it failed - so I moved it back - it worked?
As Murphys' laws of programming state:
Does the damn thing work?
If yes then don't touch it!
Thanks again though. Very thoughtful.


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

Gamestudio download | 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