View Single Post
Old 21/02/2020, 08:54 PM   #8
Razvan234512312
Little Clucker
 
Join Date: Jan 2019
Posts: 20
Reputation: 0
Default Re: SA-MP Scripting help me pls...

I have error xd

C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(41) : warning 213: tag mismatch
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(44) : warning 217: loose indentation
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(61) : warning 213: tag mismatch
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(62) : warning 217: loose indentation
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(62) : warning 213: tag mismatch
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(72) : error 029: invalid expression, assumed zero
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(72) : warning 215: expression has no effect
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(72) : error 001: expected token: ";", but found ")"
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(72) : error 029: invalid expression, assumed zero
C:\Users\kfune\Desktop\GM de Ash\gamemodes\gm.pwn(72) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[Finished in 0.2s]






////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <a_samp>

#include <a_mysql>


new SQL = -1, qQuery[256] ;



#define function%0(%1) forward %0(%1); public %0(%1)

enum pInfo {
pSQLID,
pName[MAX_PLAYER_NAME],
pPassword[32],
pEmail[32],
pGender
}
new PlayerInfo[MAX_PLAYERS][pInfo];

enum {
// Register
DIALOG_REGISTER,
DIALOG_EMAIL,
DIALOG_GENDER,

// Login
DIALOG_LOGIN
}

#define Ash "#1"

main() { print("Gamemode-ul este in curs de procesare..."); }





public OnGameModeInit()
{
SQL = mysql_connect("localhost", "root", "ash", "");

// Don't use these lines if it's a filterscript
SetGameModeText(Ash);
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}



public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid) {
qQuery[0] = EOS;
mysql_format(SQL, qQuery, sizeof(qQuery), "SELECT * FROM `users` WHERE `Name`='%s' LIMIT 1", GetName(playerid));
mysql_tquery(SQL, qQuery, "CheckAccount", "1", playerid);
return 1;

}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
switch(dialogid) {
case DIALOG_REGISTER: {
if(!response)
return Kick(playerid);

if(strlen(inputtext)) < 6 || strlen(inputtext) > 32)
return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a te putea inregistra (minim 6 caracter / maxim 32):", "Select", "Cancel");

qQuery[0] = EOS;
mysql_format(SQL, qQuery, sizeof(qQuery), "INSERT INTO `users` (`Name`, `Password`) VALUES ('%s', '%s')", GetName(playerid), inputtext);
mysql_tquery(SQL, qQuery, "insertAccount", "i" playerid);
}
}
return 1;
}
function inserAccount(playerid) {
PlayerInfo[playerid][pSQLID] = cache_insert_id();
printf("%s s-a inregistrat #%d.", GetName(playerid), PlayerInfo[playerid][pSQLID]);
return 1;
}

function CheckAccount(playerid) {
switch(cache_num_rows()) {
case 0: ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a te putea inregistra (minim 6 caracter / maxim 32):", "Select", "Cancel");
case 1: ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Scrie Parola pentru a te putea loga:", "Select", "Cancel");
}
return 1;
}

stock GetName(playerid) {
new playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
return playerName;
}
Razvan234512312 is offline   Reply With Quote