Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: [ANET] Panel creation [Re: Rasch] #293983
10/15/09 11:23
10/15/09 11:23
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
The Problem is the following line:

Quote:

var temp;
STRING* data_str;
vec_set(temp, mouse_pos);


vec_set() excepts a VECTOR and not a var.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANET] Panel creation [Re: Dark_samurai] #293984
10/15/09 11:28
10/15/09 11:28
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
Ok but

temp.x = mouse_pos.x
temp.y = mouse_pos.y

donīt work. Itīs not a member of ".x" whatever this means what is the solution at the moment iīm really lost with that small problem.

Re: [ANET] Panel creation [Re: Rasch] #294002
10/15/09 14:03
10/15/09 14:03
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Yes because you are using a var. A var is not a VECTOR. A VECTOR has .x, .y, .z but a var can only have a floating point value.

Code:
STRING* data_str = str_create("#100");
STRING* temp_str = str_create("#100");
str_for_num(data_str,mouse_pos.x);
str_for_num(temp_str,mouse_pos.y);
str_cat(data_str," ");
str_cat(data_str,temp_str);

//Use str_remove() when you don't need the strings anymore



This generates the following string: [value of mouse_pos.x][space][value of mouse_pos.y]
You should be able to read out the values after you sent them wink


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANET] Panel creation [Re: Dark_samurai] #294008
10/15/09 14:33
10/15/09 14:33
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
Alright seems a bit complicated for that simple function but thanks grin

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

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