Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-08-19, 17:23


Drak







Wiek: 34
Na forum: 4903 dni
Posty: 71
Nick w MP: Drak

Piwa: 3

Respekt: 50

Witam mam problem z getAccountData.

Kod:
function spawnInLS(thePreviousAccounttheCurrentAccountautoLog)
    if not isGuestAccount(getPlayerAccount(source)) then
        local accData getAccountData(theCurrentAccount"p-money")
        if accData then
            local pmoney getAccountData(theCurrentAccount"p-money")
            local phealth getAccountData(theCurrentAccount"p-health")
            local parmor getAccountData(theCurrentAccount"p-armor")
            local pwanted getAccountData(theCurrentAccount"p-wanted")
........
end



Nie dawa?em ca?ego kodu poniewa? jest problem z 3 linik?.

B??d:
Kod:

WARNING:[zombie]/zombie/save.lua:3: Bad argument @ 'getAccountData' [Expected account at argument 1, got nil]


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-08-19, 20:33


Wittx

8===D






Wiek: 26
Na forum: 4794 dni
Posty: 121
Nick w MP: wittula

Piwa: 1905

Respekt: 120
Respekt: 120

 local accData getAccountData(theCurrentAccount"p-money")


theCurrentAccount = nie oznaczy?e?, czym jest.

Powinno to wygl?da? tak:
function spawnInLS(thePreviousAccounttheCurrentAccountautoLog)
    if not isGuestAccount(getPlayerAccount(source)) then

        local theCurrentAccount getPlayerAccount(source) --O to mi chodzi?o

        local accData getAccountData(theCurrentAccount"p-money")
        if accData then
            local pmoney getAccountData(theCurrentAccount"p-money")
            local phealth getAccountData(theCurrentAccount"p-health")
            local parmor getAccountData(theCurrentAccount"p-armor")
            local pwanted getAccountData(theCurrentAccount"p-wanted")
........
end


Postaw piwo autorowi tego posta
 

 
Tagi: getaccountdata :: ...
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku