View Single Post
Old 14.07.2007, 19:44   #406
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

Few comments after quick look (I compare to NASC like version, so here it is...)

1)
Code:
	handler TALK_SELECTED (talker)
	{
		myself->ShowPage(talker, "noquest.htm");
	}
	handler_end
There shouldn't be this 'handler_end' line after each handler. Simply '}' closes the handler in nasc. Same for 'class_end'

2)
Code:
			Select Case ( reply )
			{
Select case ? Nooo... just Select(reply) { ..... }
and 'case ( 0 )' should be 'case 0:'

3) Not really important, but most people would expect to see words 'if','else', 'case','select' started with small letter, not 'If','Else','Case','Select'

4) 'parameter_define_begin' should be changed to 'parameter:'.
5) Parameters, for example 'int PosX 1' should look like this: 'int PosX = 1;'
6) After parameters, and before first handler in class there should be line with: 'handler:'
7) 'handler TALKED (talker)' should be 'EventHandler TALKED (talker)'
8) As far as I remember in nasc there was no 'elseif' condition, only 'else if' (with space)
9)
Code:
				ElseIf ( (reply == 532 || reply == 549) )
				{
				}
				Else 
				{
					myself->ShowMultisell(reply, talker);
				}
				Else 
				{
				}
				Else 
				{
					myself->ShowMultisell(reply, talker);
				}
Wooot? 2x Else too much for some reason...

10) Error while decompiling this code (from guard_move_around_fixed)
Code:
	push_event	//  myself
	push_const 704
	add
	fetch_i
	func_call 184549453	//  func[InstantRandomTeleportInMyTerritory]
	shift_sp -1
Stack empty, and it says number of some line (each time different number)
ateh is offline