Forum

> > CS2D > Scripts > Script error: Freezing bots & Error flags
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script error: Freezing bots & Error flags

6 replies
To the start Previous 1 Next To the start

old Script error: Freezing bots & Error flags

Alistaire
User Off Offline

Quote
I'm testing my new mod all the time when I change the script, and since a while the script crashes the game. The log files give no reason, but the bots crash and when you touch the flag the game shuts down.

Really DC?

Spoiler >


Logfiles..

----

EDIT:

It seems I can't take ANYTHING 0-0
Might be the script yeah

1
2
3
4
5
6
7
8
9
10
11
addhook("walkover","sample.classes.walkover")
	function MM.classes.walkover(id,iid,type)
    		if (type>=61 and type<=68) then
          		return 0
		elseif (type==55) then
			return 0
		elseif (type>=70 and type<=71) then
			return 0
     		end
	return 1
end

This code is malfunctioning
edited 2×, last 29.10.11 08:36:47 am

old Re: Script error: Freezing bots & Error flags

Bowlinghead
User Off Offline

Quote
Check file bots/includes/general.lua in line 63.

Is there an variable that you use too?
Or somehting?

EDIT:
Is that really a part of your log file?
1
[23:15:45] A miracle occurs! Your PC can't handle the tiny processor use of taking a flag! Congrats bro!

old Re: Script error: Freezing bots & Error flags

Mechanolith
User Off Offline

Quote
user Bowlinghead has written
Check file bots/includes/general.lua in line 63.

Is there an variable that you use too?
Or somehting?

EDIT:
Is that really a part of your log file?
1
[23:15:45] A miracle occurs! Your PC can't handle the tiny processor use of taking a flag! Congrats bro!

Kinda of course not.

old Re: Script error: Freezing bots & Error flags

DC
Admin Off Offline

Quote
a bug in CS2D? how is that possible? DC should be killed for this insolence! how can there be a bug in a 60k+ line game and a 1,2k+ line AI script? DC is such an idiot!

well.. that's how your "Really DC?" sounds to me. it's not cool.

unfortunately I can't reproduce this bug. please provide your map and your Lua script so I can test and fix it.

old Re: Script error: Freezing bots & Error flags

Alistaire
User Off Offline

Quote
Of course it's an error from my mod.. I guess.

----

Sry DC, it wasn't meant that way.

----

This is line 63 of the bot script;

1
2
3
4
5
6
7
8
9
10
-- Walk Aim
-- id: player
function fai_walkaim(id)
	local x=player(id,"x")
	local y=player(id,"y")
[b]	local angle=math.deg(math.atan2(x-vai_px[id],vai_py[id]-y))[/b]
	ai_aim(id,x+math.sin(math.rad(angle))*150,y-math.cos(math.rad(angle))*150)
	if vai_px[id]~=x then vai_px[id]=x end
	if vai_py[id]~=y then vai_py[id]=y end
end

But I can't see anything like my script...?

old Re: Script error: Freezing bots & Error flags

Yates
Reviewer Off Offline

Quote
user DC has written
a bug in CS2D? how is that possible? DC should be killed for this insolence! how can there be a bug in a 60k+ line game and a 1,2k+ line AI script? DC is such an idiot!

His head should be on a spike! Find the nearest castle.. arrghh.. Oh, wait. That's a pirate.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview