What's new

Skrypt problem (He he * frags)

Status
Not open for further replies.

keal1

Advanced User
Joined
Dec 8, 2009
Messages
339
Reaction score
21
Witam znalaz?em skrypt kt?ry mia? polega? na tym ?? je?eli klikne na player'a lub na siebie poka?e mi ilo?? frag?w. Lecz problem jest taki ?? jak go dodam nie mog? wogol? zobaczy? playera jak? jest profesj? ani nie widz? frag?w ..:>

Posiadam silnik TFS 0.3.6, 8.54

Oto skrypt
PHP:
function onLook(cid, thing, position, lookDistance)
if(isPlayer(thing.uid) == true) then
doPlayerSetSpecialDescription(thing.uid, ". "..(getPlayerSex(thing.uid) == 0 and "She has" or "He has").." "..getPlayerFrags(thing.uid).." frags")
elseif(isPlayer(thing.cid) == true) then
doPlayerSetSpecialDescription(thing.cid, ". You have "..getPlayerFrags(cid).." frags")
end
return true
end

W silniku wywala mi b?ad gdy na kogo? prob?je klikn??

data/creaturescripts/scripts/lookfrags.lua:3: in function data/creaturescripts/scripts/lookfrags.lua:1>

data/creaturescripts/scripts/lookfrags.lua:eek:nLook
Description:
data/creaturescripts/scripts/lookfrags.lua:3: attemp to call global 'getPlayerFrags'<a nil value>



Prosz? o pomoc , dam reputka :)
 

keal1

Advanced User
Joined
Dec 8, 2009
Messages
339
Reaction score
21
Odp: Skrypt problem (He he * frags)

~~~Refresh~~~

Kto? jest w stanie pom?c? O co tutaj chodzi :(
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Skrypt problem (He he * frags)

Nie masz funkcji getPlayerFrags, a je?li masz to daj warunek
PHP:
if getPlayerFrags(cid) ~= 0 then
PS. 1000 post.
 

Tibionauta

Advanced User
Joined
May 8, 2008
Messages
388
Reaction score
43
Odp: Skrypt problem (He he * frags)

@Up.
No to skoro nie ma tej funkcji, a na to wygl?da to jak doda ten warunek to mu to nic nie da.

@Topic.
Po pierwsze thing.cid to moim zdaniem b??d, bo zamierzasz odczytywa? warto?? przez uid a cid to clientid... Po errorze mo?na si? domy?li?, ?e nie masz w silniku tej funkcji, tak jak ju? i zreszt? powiedzia? pan wy?ej.
 

keal1

Advanced User
Joined
Dec 8, 2009
Messages
339
Reaction score
21
Odp: Skrypt problem (He he * frags)

Czyli dok?adnie jest szansa aby ten skrypt dzialal w moim silniku??

Zajrza?em do LUA_FUNCTION w silniku i znalaz?em "getPlayerFrags(cid)"

Czy m?g?by kto? og?lnie mi powiedzie? czy jest szansa aby skrypt dzialal a je?eli tak , to co musz? zrobi?..

Z g?ry dzi?kuje
 

Tibionauta

Advanced User
Joined
May 8, 2008
Messages
388
Reaction score
43
Odp: Skrypt problem (He he * frags)

Je?eli ta funkcja sprawia takie problemy, a powinna dzia?a? to mo?esz jeszcze ew. wywo?a? zapytanie MySQL, kt?re "r?cznie" pobierze ilo?? frag?w z bazy danych.
 

keal1

Advanced User
Joined
Dec 8, 2009
Messages
339
Reaction score
21
Odp: Skrypt problem (He he * frags)

Ok dzi?ki za pomoc jako? sobie sam poradzi?em ...

Temat prosz? zamkn??.
 
Status
Not open for further replies.
Top