Anyone can fix this for me?
#21

Quote:
Originally Posted by JasonRiggs
View Post
Giving up so quickly isn't from scripters features, If you give up such quickly, I suggest you shouldn't even script, As scripting ain't breastfeeding, It's hard not anyone can script.
I have more things to do man, I'm trucker and I've still study.
Scripting is just because I would lik to have a sa-mp server but ain't got much time to do it.
Neither have cash to rent someone to script for me, however, I'll try again..
Reply
#22

Just get back the script and replace the codes which got the bugs with the codes which I've given you.
Reply
#23

How about all these warnings?
Reply
#24

I've already fixed them for you in my long comment
Reply
#25

Code:
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1050) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1051) : error 017: undefined symbol "mysql_store_result"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1053) : error 017: undefined symbol "mysql_num_rows"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1240) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1241) : error 017: undefined symbol "mysql_store_result"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1243) : error 017: undefined symbol "mysql_num_rows"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1245) : warning 202: number of arguments does not match definition
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1248) : error 029: invalid expression, assumed zero
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1253) : error 014: invalid statement; not in switch
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1253) : warning 215: expression has no effect
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1257) : warning 219: local variable "query" shadows a variable at a preceding level
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1257) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1260) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1264) : warning 202: number of arguments does not match definition
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1272) : error 029: invalid expression, assumed zero
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1272) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1276) : error 030: compound statement not closed at the end of file (started at line 1235)
This is what I get now with your codes

Your codes (line 1035 to 1075):

Code:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 12025.1689,-12880.7031,2.2219);
	SetPlayerFacingAngle(playerid, 40.0);
	SetPlayerCameraPos(playerid, 12021.9229,-12875.6885,2.2219);
	SetPlayerCameraLookAt(playerid, 12025.1689,-12880.7031,2.2219);
	return 1;
}

public OnPlayerConnect(playerid)
{new query[126], pName[MAX_PLAYER_NAME];

	GetPlayerName(playerid, pName, sizeof(pName));

	format(query, sizeof(query), "SELECT FROM accounts WHERE name = '%s'", pName);
	mysql_query(query);
	mysql_store_result();

	if(mysql_num_rows()== 1)
	{
 		SendClientMessage(playerid, -1, "That username is already in use!");
		ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Login", "Please enter your password to login.", "Login", "Cancel");
	}
	else
 		SendClientMessage(playerid, -1, "That username is valid to be registered!");
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{	SendClientMessage(playerid,IntColor, "45 minutes ago: [Cruise Ship Intercom] We are approaching Tikibayй, prepare your luggage and get your children from their activities!");
	SendClientMessage(playerid,IntColor, "30 minutes ago: [Cruise Ship Intercom] Make sure to register yourself and your family on the island by using their website: www.tikibaye.tk!");
	SendClientMessage(playerid,IntColor, "30 minutes ago: [Cruise Ship Intercom] The law enforcement can give you a ticket for being on the island without registration.");
	SendClientMessage(playerid,IntColor, "10 minutes ago: [Cruise Ship Intercom] We have arrived at Tikibayй, enjoy your stay on the island!");
	SendClientMessage(playerid,DoColor, "You have arrived on a Tropical Island called Tikibayй.");
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{SetPlayerHealth(playerid,0);
	 SendClientMessage(playerid, StaColor, "You have commited suicide!");
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{switch(dialogid)
	{case 0:
 		{if(response)
 		    {
		new query[124], pName[MAX_PLAYER_NAME];
 		GetPlayerName(playerid, pName, sizeof(pName));
 		format(query, sizeof(query), "SELECT FROM accounts WHERE name = '%s' AND PASSWORD = '%s'", pName, inputtext);
 		mysql_query(query);
 		mysql_store_result();
 		{
        if(mysql_num_rows()== 1)
 		SendClientMessage(playerid, -1, "You have succesfully logged in!");
 		SetSpawnInfo(playerid, 1, 299, 1, 2, 3, 1, 1, 1, 999, 1, 999);
 		SpawnPlayer(playerid);
 		}
 		else
 		{
		 	SendClientMessage(playerid, -1, "Incorrect password!");
			ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Login", "Please enter your password to login.", "Login", "Cancel");
 		}
 		case 1;
 		{
 		if(response)
 		{
			new query[126], pName[MAX_PLAYER_NAME];
			GetPlayerName(playerid, pName, sizeof(pName));
			format (query, sizeof(query), "INSERT INTO accounts VALUES('%s', '%s')", pName, inputtext);
			mysql_query(query),

			SendClientMessage(playerid, -1, "You have succesfully registered your account!");

			SetSpawnInfo(playerid, 1, 299, 1, 2, 3, 1, 1, 1, 999, 1, 999);
			SpawnPlayer(playerid);

 		}
	}
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#26

try
Code:
mysql_format(MainPipeline, query, sizeof(query),"SELECT FROM accounts WHERE name = '%s'", pName);
	mysql_tquery(MainPipeline, query, "SELECT FROM accounts WHERE name = '%s'", pName);
try this instead of line 1050 If its error is fixed tell me, If not, Tell me also.
Reply
#27

Quote:
Originally Posted by JasonRiggs
View Post
try
Code:
mysql_format(MainPipeline, query, sizeof(query),"SELECT FROM accounts WHERE name = '%s'", pName);
	mysql_tquery(MainPipeline, query, "SELECT FROM accounts WHERE name = '%s'", pName);
try this instead of line 1050 If its error is fixed tell me, If not, Tell me also.
Didn't work:

Code:
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1049) : error 017: undefined symbol "MainPipeline"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1050) : error 017: undefined symbol "MainPipeline"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1051) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1052) : error 017: undefined symbol "mysql_store_result"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1054) : error 017: undefined symbol "mysql_num_rows"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1241) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1242) : error 017: undefined symbol "mysql_store_result"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1244) : error 017: undefined symbol "mysql_num_rows"
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1246) : warning 202: number of arguments does not match definition
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1249) : error 029: invalid expression, assumed zero
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1254) : error 014: invalid statement; not in switch
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1254) : warning 215: expression has no effect
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1258) : warning 219: local variable "query" shadows a variable at a preceding level
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1258) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1261) : error 035: argument type mismatch (argument 1)
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1265) : warning 202: number of arguments does not match definition
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1273) : error 029: invalid expression, assumed zero
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1273) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\Ivor Keizer\Documents\Tropical Island Roleplay\gamemodes\tikibayй2.pwn(1277) : error 030: compound statement not closed at the end of file (started at line 1236)
Reply
#28

Someone help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)