Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My simple Gun System not working?

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

✓ Accepted answer

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'

1 comment

0

Thank you so much Customality! I was able to fix it by changing function Shoot() to void Shoot()

This discussion is preserved as it was. New answers, comments, and votes are closed.