Well for one, you should be escaping strings like this:
[code]local RPFirst = tmysql:Escape(net.ReadString())[/code]
There should not be quotes around net.ReadString, and there should also be () at the end.
I'm not quite sure what you're trying to do here.
Is this inside a net.Receive??
If so you're probably looking for this (In tMySQL4 I believe tmysql.escape may be changed to the global DB:Escape):
[code]
local RPFirst = tmysql.escape( net.ReadString() )
local RPLast = tmysql.escape( net.ReadString() )
local RPRank = "555" .. tostring(math.Round(math.Rand(0, 9999)))
local RPModel = tmysql.escape( net.ReadString() )
local RPColor = tmysql.escape(net.ReadString() )
[/code]
-Snip-
try Escape (uppercase)
-Snip-
I googled it and found these 2 threads:
[url]https://facepunch.com/showthread.php?t=1497337[/url]
[url]http://forums.ulyssesmod.net/index.php?topic=9630.0[/url]
try:
[code]
local RPFirst = db:Escape( net.ReadString() )
[/code]
where "db" is whatever your database object is called.
-Snip-
[QUOTE=nedredl;51033428][U][B]where "db" is whatever your database object is called[/B][/U][/QUOTE]
-Snip-
What is the name of your database object variable? what does the code look like where you create the database connection?
[code]tmysql:Escape[/code] wouldn't work because tmysql isn't the variable, it's the library.
-Snip-
Should be. Have you tried merging the two files? Maybe one is getting run before the other
-Snip-
Have you made sure you're not running any mysql code on the client? Do
[code]
if SERVER then
--net read and escape code here
end
[/code]
-Snip-
I don't know honestly, sorry.
[QUOTE=Dannyboy99;51036213]This is the error i got
this is my code whole [url]http://pastebin.com/XB68bGD1[/url]
This is one of my fully first project alone so thanks for all help :)[/QUOTE]
Add this as well inside the serverside check with the net.Receive name:
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/util/AddNetworkString]util.AddNetworkString[/url]
-Snip-
Since it is a shared file, please make sure that you have included the file in both the cl_init.lua and init.lua as it is a gamemode.
Include the tmysql file into the file that you are trying to reference its objects and methods.
Just off topic,
Why are you using PGRP?
This is a private gamemode that I assume you just stole...
[t]https://i.gyazo.com/6221a0439cd97faded573e48f25da86c.png[/t]
If you haven't figured out how to escape a string by now, you'll probably have no chance running a stolen gamemode.
-Snip-
Even if you were given the gamemode it still doesn't give you permission to use it lol
-Snip-
[QUOTE=Dannyboy99;51040908]I am not here to defend myself i was told, that i can use this as a frame if i gave him a copy off it, i will not say any name but if i am not allowed to.. i will not use it that is all iknow and if so i will leave his steam so you can stop him he is giving this out to everyone, and the gamemode work Fine just a small issue but i fix it ...???
and who can give me permission to use it as the guy i was talking to said i am allowed?[/QUOTE]
Who's the guy, Rustic7?
-Snip-
Sorry, you need to Log In to post a reply to this thread.