• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved [TFS 1.0] Databasequery/Maxhealth/Npc

Giddran

Techical Artist
Joined
Sep 8, 2007
Messages
70
Reaction score
25
Location
Sweden
Hey guys, i'm trying to create a npc that can got the ability to raise values like health, cap, mana. I reconize that i got barely no clue how to query the database and make changes. I tried adding the function below which only gave me "attempt to call field 'executeQuery <a nil value>' stacktraceback: 'setmaxhealth' 'callback'

Code:
function setMaxHealth(cid, health)
return db.executeQuery("UPDATE players SET maxhealth=" .. health .. " WHERE id='" .. getPlayerGUID(cid))
end
 
Back
Top