Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 1,929 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
typo in keys.c template #333521
07/16/10 22:19
07/16/10 22:19
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline OP
Serious User
Nidhogg  Offline OP
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
There is a type in the new keys.c
Code:
byte _keys_down[256];

// returns nonzero when the given key was hit since the last call
function key_hit(var num)
{
	if (num <= 0 || num >= 256) return 0;
	if(!_keys_down[num] && key_pressed(num))
	{ 
		_keys_down[num] = 1;
		return 1;
	} 
	_keys_down[num] = key_pressed(num);
	return 0;
}

// returns nonzero when the key with the given name was hit
function key_hit(STRING* keystr)
{
	return key_hit(key_for_str(keystr));
}


As you can see there a two key_hit() functions.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: typo in keys.c template [Re: Nidhogg] #333528
07/16/10 22:30
07/16/10 22:30
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Technically, there is no problem with that, that's called overloading functions. If you use a var as parameter, the first one is used and if you use a string as parameter, the second one is used. I guess they are meant to have the same name, as they are documented with the same name:
http://www.conitec.net/beta/keys_c.htm

Re: typo in keys.c template [Re: Lukas] #333628
07/17/10 19:15
07/17/10 19:15
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline OP
Serious User
Nidhogg  Offline OP
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Oh ok, thanks for explaining.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus

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