#1

2 error in this script: C:\Users\Kevin11\Desktop\Napoli\gamemodes\rp.pwn(3 74) : warning 202: number of arguments does not match definition
C:\Users\Kevin11\Desktop\Napoli\gamemodes\rp.pwn(9 09) : error 001: expected token: ")", but found "return"


Script: This is Error (374):

public OnFilterScriptInit()
{
print("Sistema veicoli affittabili fatto da EdwardStone Caricato");
//* Per aggiungere i veicoli qui */
Veicolo[0] = AddStaticVehicle(481,1146.8236,-1414.2587,13.6741,13,16);
return 1;
}


This is Error (909): CMD:affittauto(playerid, params[]) /* Comando per affittare un veicolo */
{
if(GetPlayerMoney(playerid <=1000)return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
if(DentroVeicolo[playerid] == 1)return SendClientMessage(playerid, 0xAA3333AA, "Non sei dentro un veicolo Affittabile!"); /* Controlla se и dentro un veicolo affittabile */
SendClientMessage(playerid, 0xF69521AA, "Hai affittato questo veicolo!");
InAffitto[playerid] = 1;
TogglePlayerControllable(playerid, 1); /* Unfreeza il giocatore */
GivePlayerMoney(playerid, -1000); /* Per non farlo andare sotto i 1000$ */
return 1;
}
Reply
#2

It's very hard to read use [ php ] [ / php ] please.
Reply
#3

PHP код:
public OnFilterScriptInit()
{
print(
"Sistema veicoli affittabili fatto da EdwardStone Caricato");
//* Per aggiungere i veicoli qui */
Veicolo[0] = AddStaticVehicle(481,1146.8236,-1414.2587,13.6741,13,16);
return 
1;

PHP код:
CMD:affittauto(playeridparams[]) /* Comando per affittare un veicolo */
{
if(
GetPlayerMoney(playerid <=1000)return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
if(DentroVeicolo[playerid] == 1)return SendClientMessage(playerid0xAA3333AA"Non sei dentro un veicolo Affittabile!"); /* Controlla se и dentro un veicolo affittabile */
SendClientMessage(playerid0xF69521AA"Hai affittato questo veicolo!");
InAffitto[playerid] = 1;
TogglePlayerControllable(playerid1); /* Unfreeza il giocatore */
GivePlayerMoney(playerid, -1000); /* Per non farlo andare sotto i 1000$ */
return 1;

Reply
#4

Quote:
Originally Posted by kevi11
Посмотреть сообщение
PHP код:
public OnFilterScriptInit()
{
print(
"Sistema veicoli affittabili fatto da EdwardStone Caricato");
//* Per aggiungere i veicoli qui */
Veicolo[0] = AddStaticVehicle(481,1146.8236,-1414.2587,13.6741,13,16);
return 
1;

PHP код:
CMD:affittauto(playeridparams[]) /* Comando per affittare un veicolo */
{
if(
GetPlayerMoney(playerid <=1000)return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
if(DentroVeicolo[playerid] == 1)return SendClientMessage(playerid0xAA3333AA"Non sei dentro un veicolo Affittabile!"); /* Controlla se и dentro un veicolo affittabile */
SendClientMessage(playerid0xF69521AA"Hai affittato questo veicolo!");
InAffitto[playerid] = 1;
TogglePlayerControllable(playerid1); /* Unfreeza il giocatore */
GivePlayerMoney(playerid, -1000); /* Per non farlo andare sotto i 1000$ */
return 1;

PHP код:
CMD:affittauto(playeridparams[]) /* Comando per affittare un veicolo */
{
if(
GetPlayerMoney(playerid <=1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
if(DentroVeicolo[playerid] == 1) return SendClientMessage(playerid0xAA3333AA"Non sei dentro un veicolo 

You have to put a space between the ')' and the 'return'
Reply
#5

Don't go error 001: expected token: ")", but found "return"
Reply
#6

I can't see why it should return a error on that line...
Reply
#7

PHP код:
if(GetPlayerMoney(playerid <=1000) return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
    
if(DentroVeicolo[playerid] == 1) return SendClientMessage(playerid0xAA3333AA"Non sei dentro un veicolo Affittabile!"); /* Controlla se и dentro un veicolo affittabile */ 
Reply
#8

Oh wait, I see the error:

You forgot a ',' comma
PHP код:
CMD:affittauto(playeridparams[]) /* Comando per affittare un veicolo */
{
if(
GetPlayerMoney(playerid, <=1000)return SendClientMessage(playerid0xAA3333AA"Non hai abbastanza soldi! (1000$)"); /* Controlla i soldi del giocatore */
if(DentroVeicolo[playerid] == 1)return SendClientMessage(playerid0xAA3333AA"Non sei dentro un veicolo Affittabile!"); /* Controlla se и dentro un veicolo affittabile */
SendClientMessage(playerid0xF69521AA"Hai affittato questo veicolo!");
InAffitto[playerid] = 1;
TogglePlayerControllable(playerid1); /* Unfreeza il giocatore */
GivePlayerMoney(playerid, -1000); /* Per non farlo andare sotto i 1000$ */
return 1;

Reply
#9

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Oh wait, I see the error:

You forgot a ',' comma
PHP код:
if(GetPlayerMoney(playerid, <=1000
Are you fucking kidding me? How can that ever be valid? The compiler complains about a missing closing bracket yet you somehow manage insert a comma in the exact spot the closing bracket should be.

As for that other warning: look up the definition and count. Very likely that the 'angle' argument was forgotten.
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
Are you fucking kidding me? How can that ever be valid? The compiler complains about a missing closing bracket yet you somehow manage insert a comma in the exact spot the closing bracket should be.

As for that other warning: look up the definition and count. Very likely that the 'angle' argument was forgotten.
plus I'd remove the '=' as the player needs 1001 for it now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)