Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 996 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Ent_create problem iwith strings .... bug? #90470
09/17/06 11:00
09/17/06 11:00
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline OP
Senior Expert
PHeMoX  Offline OP
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Everytime I want to create an entity using a string, it doesn't give script errors, however it doesn't work, stating it can't open the file. (Usually giving me a weird "can't open file <°>" error ...) But when I simply fully enter the filename in the ent_create line, it works without any problems ... How could this be? What am I doing wrong here?

This works:
Code:
ent_createlocal("bloody.tga", target.x, particle_blood);



This doesn't work;
Code:
string blood = "bloody.tga";



Code:
ent_createlocal(blood, target.x, particle_blood);




Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Ent_create problem iwith strings .... bug? [Re: PHeMoX] #90471
09/17/06 12:35
09/17/06 12:35
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Have you tried to set the string up like this:
Code:

string blood = <bloody.tga>;



I'm not sure if this will make a difference, but its worth a try isn't it

Re: Ent_create problem iwith strings .... bug? [Re: Xarthor] #90472
09/17/06 13:37
09/17/06 13:37
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
it should work with "" as well. This is how I do it in A5. There is no reason why this should not be supported with A6 anymore.

Re: Ent_create problem iwith strings .... bug? [Re: FBL] #90473
09/17/06 14:13
09/17/06 14:13
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline OP
Senior Expert
PHeMoX  Offline OP
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Thanks Thunder, but no, that doesn't make a difference ... both are correct and both crash when using a string here ... I'm really clueless as to why it doesn't work with strings ....

Edit: I think I've found the error, not that I quite understand it yet ... Somehow it does work when setting up the coordinates differently, strange ...

Cheers

Last edited by PHeMoX; 09/17/06 14:19.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Ent_create problem iwith strings .... bug? [Re: PHeMoX] #90474
09/18/06 07:04
09/18/06 07:04
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
There can be several reasons for errors on entity creation, but whether you're writing a string in "" or <>, or at which coordinates you create the entity does not matter.

Possible reasons are a damaged file, a faulty entity action, or - likely in your case - having other objects with the same name as your string or position vector.


Moderated by  old_bill, Tobias 

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