Forum

> > CS2D > Scripts > wrong lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch wrong lua

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt wrong lua

Marcell
Super User Off Offline

Zitieren
whats wrong with this lua?

1
2
3
4
5
6
7
8
addhook("say","idontknow")
function idontknow(id,txt)
if (txt=="!bff") then
	freeimage(id) 
	id=image("gfx/bttf/delorean.png",1,1,200+id)
parse("speedmod "..id.." "..player(id,"speedmod")+1)
end
end

alt Re: wrong lua

Yates
Reviewer Off Offline

Zitieren
You free the image when you don't have one. This will show an error in the console and it won't continue to do anything else.

alt Re: wrong lua

Marcell
Super User Off Offline

Zitieren
but i have this image...
and when i type into chat: !bff
I get this EXCEPTION_ACCESS_VIOLATION

alt Re: wrong lua

DC
Admin Off Offline

Zitieren
download cs2d again at www.cs2d.com/download (it's sufficient to replace the exe files). CS2D had a bug right after the release which crashed the game when Lua scripts with bugs were used.

alt Re: wrong lua

Marcell
Super User Off Offline

Zitieren
user DC hat geschrieben
download cs2d again at www.cs2d.com/download (it's sufficient to replace the exe files). CS2D had a bug right after the release which crashed the game when Lua scripts with bugs were used.


i redownloaded and installed into new folder but i get this error...

alt Re: wrong lua

EP
User Off Offline

Zitieren
you're calling a bad math calcle, try this:
1
2
3
4
5
6
7
8
addhook("say","idontknow")
function idontknow(id,txt)
if (txt=="!bff") then
     freeimage(id)
     id=image("gfx/bttf/delorean.png",1,1,200+id)
parse("speedmod "..id.." "..(player(id,"speedmod")+1))
end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht