View Full Version : [Fixed] amx_shvaulttosql runtime error
rakanashu
11-08-2004, 04:50
Is there a way to get all of the xp from the Vault.ini into the MySQL database? I just got MySQL set up and every thing is working... I just dont wana have to give ppl there levels back manualy..(will take for ever!! i have about 150+ ppl in my vault.ini) :(
i will be wait for a respons..
jtp10181
11-08-2004, 06:40
http://shero.rocks-hideout.com/docs/sh_readme.htm#commands
look at the last command
rakanashu
11-08-2004, 07:10
thank you very much jtp10181 :D :D :D :D
i tryed that command and i got this:
Please wait while the XP data is copied
[AMX] Error raised (module "???") (function "???")
[AMX] Run time error 4 on line 3654 (plugin "superheromodmysql.amx")
:? :cry:
jtp10181
11-08-2004, 17:29
do you have the mysql module enabled?
what version of AMX are you using?
rakanashu
11-09-2004, 04:07
im running amx version 0.9.9 and i have the mysql.dll enabled..
jtp10181
11-09-2004, 07:13
moving to bug reports, also fixed it. Dunno what was going on but I messed with some things in the parseXP function for mysql saving and it fixed it.
Open the superheromysql.inc and replace the parseXP function with this code
public parseXP(id, const data[] )
{
// "name" epochtime XP HUDHELP "SKILL1" "SKILL2" ...
new heroIndex
new Left[35], Right[512]
copy(Right, 511, data)
//Get the key out
strbrkqt(Right, Left, 34, Right, 511)
replace(Left, 34, "shinfo.", "" )
copy( gMemoryTableKeys[id], 34, Left)
//Get the name out
strbrkqt(Right, Left, 34, Right, 511)
copy( gMemoryTableNames[id], 31, Left)
//Get the epochtime out
strbrkqt(Right, Left, 34, Right, 511)
//Get the XP out and save it
strbrkqt(Right, Left, 34, Right, 511)
gMemoryTableXP[id] = str_to_num(Left)
//Get the HUD Status out
strbrkqt(Right, Left, 34, Right, 511)
gMemoryTableHHelp[id] = str_to_num(Left)
//Now load in all the skills
new powerCount = 0
new MaxPowers = min(get_cvar_num("sh_maxpowers"), SH_MAXLEVELS)
while ( strlen(Right) > 0 && powerCount < MaxPowers ) {
strbrkqt(Right, Left, 34, Right, 511)
heroIndex = findHero(Left)
if ( heroIndex >= 0 ) {
gMemoryTablePowers[id][0] = ++powerCount
gMemoryTablePowers[id][powerCount] = heroIndex
}
}
// Now save it to the SQL database
writeData(id)
}
rakanashu
11-09-2004, 21:09
so after u do that do u need to re-compile the .amx? or will it just work??
jtp10181
11-09-2004, 22:01
..... you need to recompile the plugin for the changed include to get compiled into it.....
rakanashu
11-10-2004, 04:01
i would re-compile it but i cant... i dont got the sma :? know where i can get it at?
*edit*
ok well i fixed it.. i had to make a amx database so i did so (so i can use the admin mysql) and it worked..
thanks for all of your help!! :D
jtp10181
11-10-2004, 06:44
you fixed it without recompilng? Or you figured out how to recompile it now?
rakanashu
11-10-2004, 07:07
i fixed it with out re-compiling it... :D
*edit*
ok so its not realy fixed....
i have noticed that all the players on my server have gone to level 1 from there reg level like after i shut down the server and put it bback up and i dont know y...
jtp10181
11-10-2004, 20:56
that has nothing to do with this, and it works fine for me. Maybe post in tech support with more information?
Partycat
11-18-2004, 14:59
Can you recompile and post the superheromodmysql.amx ?
I tried to recompile it and it will not (---abnormal termination). BSD does not like my vault setup so I have to use SQL, and I can't convert without this.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.