Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RGSS MYSQL

I don't see what is wrong with Mr.Mo's post. You just have to remove the ' require "socket"' line, and use goldenaura's socket script (found in Netplay plus, for example).

By the way, using mysql directly in rmxp is a bad idea. A simple packet sniffer would reveal the user/password, allowing the player to change both his variables and other players' variables.
 

Chap

Member

Allright, what I did was taking the socket class from NP+, and I've implented it into my project. I did the same with the script of Mr.Mo in that other topic.

What I did next was making a new class, like:

Code:
class Test
def main
@db_server = "server24.hosting2go.nl"
    @db_user = "prive"
    @db_password = "prive"
    @db_name = "RMXP"
    @@_mysql = Mysql.new(@db_server,@db_user,@db_password,@db_name)
    @@_mysql.query("INSERT INTO characters VALUES ('hallo');")
end
end

I called that script through a call script event, (@meh = Test.new)...

But nothing happened... Anything wrong? =/
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top