
xArgonx
Members-
Posts
29 -
Joined
-
Last visited
Everything posted by xArgonx
-
write me @ [email protected]
-
i have a question about sql database: if i want to create a sql table must i have a loaded database? and where does the data which inputs get saved..
-
because it did some changes: i wanted to let the script start onplayerjoin (instead of /loadacc) and onplayerquit (instead of /saveacc), but it doesn't work not data get saved and no data will load, maybe because i get an error attempt to getPlayerName (also for getPlayerUserName and getPlayerSerial) i don't know what to do... getClientName is not a updated command, so i do not use it..
-
i have already tried that, but it doesn't change anything, i think maybe there will not create any row for the users
-
i wanted to test your script but i got this: Bad ' client' pointer @ 'getPlayerName ' <1>
-
ok that's right the other problem is that i think the executeSQLInsert does to start, so there is nothing to update or to get from because there is no row for a player in the sql data table
-
actually i tried to go on whith the script i postet before now it is: function dbadd (commandName) executeSQLCreateTable ( "Players", "Money INTEGER, Skin INTERGER, Team TEXT, Wanted INTEGER, Player TEXT" ) end addCommandHandler ("dbadd", dbadd) function onjoindb () local sourcename = getPlayerName ( source ) player = executeSQLQuery("SELECT Money FROM eVo_Players WHERE Player=?", sourcename) if(#player == 0) then executeSQLInsert ( "Players", "'5000', '0', 'Arbeitsloser', '0', '" .. sourcename .. "'" ) else money = executeSQLQuery ("SELECT Money FROM Players WHERE Player=?", sourcename) setPlayerMoney( source, player[1].money ) -- wanted = executeSQLQuery("SELECT Wanted FROM Players WHERE Player=?", sourcename) setPlayerWantedLevel ( source, wanted[1].wanted ) -- team = executeSQLQuery("SELECT Team FROM Players WHERE Player=?", sourcename) setPlayerTeam (source, team[1].team) -- skin = executeSQLQuery ("SELECT Skin FROM Players WHERE Player=?", sourcename) setElementModel (source, skin[1].skin) end end addEventHandler ( "onPlayerJoin", getRootElement(), onjoindb ) function onquitdb () local sourcename = getPlayerName ( source ) getmoney = getPlayerMoney ( source ) playerskin = getElementModel ( source ) getwanted = getPlayerWantedLevel( source ) playerTeam = getTeamName(playersTeam) playersTeam = getplayerTeam (source) executeSQLUpdate ( "Players", "Money = '" .. getmoney .. "', Skin = ' "..playerskin.. " ', Team = '" .. playerTeam .. "', Wanted = '" .. getwanted .. "'", "Player = '" .. sourcename .. "'" ) end addEventHandler ( "onPlayerQuit", getRootElement(), onquitdb ) i get theses error messages: line 35: attemp to global 'getPlayerTeam' [this error could be thata i did not be in a team while testing, but i already change the team every time i tried to get the script working) i think the problem is that the executeSQLInsert does not start... hope you can help me
-
yes i have already writen and started a working script which creates team on server start
-
i did , but i tried it again today and it worked^^
-
i have the same problem... not errors but these things are not saved... it is a server side script? am i right?? must i do somthing with SQLite Browser
-
i want to replace a vortex for my server this is the script: function vortex ( ) vortex1 = engineLoadTXD ( "data/vortex.txd" ) engineImportTXD ( vortex1, 539 ) vortex2 = engineLoadDFF ( "data/vortex.dff", 539 ) engineReplaceModel ( vortex2, 539 ) end addEventHandler ( "onClientResourceStart", getRootElement(), vortex ) i make it in the meta file as client type and it work i see it but all other do not see the replaced vortex and the funny thing is that server is not on my pc^^
-
ok your right sry, i was a bit busy since i read your post first^^ i do not get any error messages now, but if i use /dbadd or updatedb nothing happens and nothing is saved
-
could u post what u have changed?
-
i have already read that topic, but it would be very nice of you, if u can update it for nightly...
-
now i get on quit the error message bad argument line 56 executeSQLUpdate ( "players", "Geld = '" .. getmoney .. "' WantedLevel = '" .. wanted .. "', Skin = '" .. skin .. "', Team = '" .. playerTeam .. "', Player = '" .. sourcename .. "'" ) and on login gives the local 'money' a bolean value, line 29: else local money = executeSQLSelect ( "players", "Geld", "Player = '" .. sourcename .. "'" )
-
i have problem with the script from knash 94, i changed it a bit because i got many errors, but now i get this errors: after login out: line 45: attemp to concatenate global 'playerTeam' after login: line 21: attemp to index field '?' (here i think is a argument wrong, but which?) here the script: function createSQLOnStart(player, commandName) executeSQLCreateTable ( "players", "Geld INTERGER, WandetLevel INTERGER, Skin INTERGER, Team TEXT, Player TEXT" ) end addEventHandler ("onResourceStart",getRootElement(), createSQLOnStart) function updatedb ( sourcePlayer, theTeam ) sourcename = getPlayerName ( sourcePlayer ) Player = executeSQLSelect ( "players", "Player", "Player = '" .. sourcename .. "'" ) if ( Player == false ) then outputChatBox("Du hast keinen Account zum updaten", sourcePlayer) else executeSQLUpdate ( "players", "Geld = '5000', WandetLevel = '0', Skin = '0', Team = 'Arbeitsloser'", "Player = '" .. sourcename .. "'" ) end end addCommandHandler ("updatedb", updatedb) function onjoindb () local sourcename = getPlayerName (source) player = executeSQLSelect ( "players", "Player", "Player = '" .. sourcename .. "'" ) if ( player == false ) then executeSQLInsert ( "players", "'5000', '0', '0', 'Arbeitsloser'" .. sourcename .. "'" ) else money = executeSQLSelect ( "players", "Geld", "Player = '" .. sourcename .. "'" ) setPlayerMoney(source, money[1][1] ) local WantedLevel = executeSQLSelect ( "players", "WantedLevel", "Player = '" .. sourcename .. "'" ) setPlayerWantedLevel (source, WantedLevel[1][1] ) local Skin = executeSQLSelect ( "players", "Skin", "Player = '" .. sourcename .. "'" ) setElementModel (source, Skin[1][1] ) local Team = executeSQLSelect ( "players", "Team", "Player = '" .. sourcename .. "'" ) setPlayerTeam( source, getTeamFromName( Team[1][1] ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), onjoindb ) function onquitdb () local sourcename = getPlayerName ( source ) getmoney = getPlayerMoney ( source ) playerTeam = getPlayerTeam ( source ) wanted = getPlayerWantedLevel( source ) skin = getElementModel ( source ) executeSQLUpdate ( "players", "Geld = '" .. getmoney .. "' WandetLevel = '" .. wanted .. "', Skin = '" .. skin .. "', Team = '" .. playerTeam .. "', Player = '" .. sourcename .. "'" ) end addEventHandler ( "onPlayerQuit", getRootElement(), onquitdb )
-
and how can i set a variable to a definiton of the table
-
and how are the comands for sql?
-
to save skins for example or money sql is to slowly
-
I'm searching for, how i can save values in variables in .xml files. I have already searched in the forum but i could not find any way.
-
oh sorry i#m stupid
-
yeah i already wound this, but it doesn't change anything : attemp to call global 'createColCubiod'
-
thanks very much to u it works perfektly i try to think better while srcipting..