Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My simple Gun System not working?

Asked by 5 years ago

I'm really new to ROBLOX LUA and I am sorry for asking stupid questions can somebody help me please? Here's my code im new :

local Player = new game.Players.LocalPlayer();
local Mouse = new Player.Mouse();
local Gun = new Gun("<?php global $Mouse; echo(Mouse); ?>");
local p = new Promise(function(r,e) {
    pcall(function()
        print(Gun == true and Mouse:SonOf(Player.Name:GetPlayerName());
    end);
});

function Shoot() 
    return "CREATE TABLE SHOOTING(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
Shot VARCHAR(15) NOT NULL, -- Bullet ID
Shotted VARCHAR(32) NOT NULL, -- Player Name ( 32 Characters max )
BulletName VARCHAR(9e9), -- Bullet Name XD
reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";
end;

if click then
    mouse.clicked = true;
    mouse.Icon = "<img src="shoot shoot.png"  height="42" width="15">";
    Shoot();
end;

1 answer

Log in to vote
0
Answered by 5 years ago

Hmm.... I don't think that syntax is correct. I get these errors when compiling: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2146: syntax error: missing ';' before identifier 'Player'

0
Thank you so much Customality! I was able to fix it by changing function Shoot() to void Shoot() Scarperino 20 — 5y
Ad

Answer this question