help -
kevi11 - 16.03.2016
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;
}
Re: help -
saffierr - 16.03.2016
It's very hard to read use [ php ] [ / php ] please.
Re: help -
kevi11 - 16.03.2016
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(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;
}
Re: help -
saffierr - 16.03.2016
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(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;
}
|
PHP код:
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
}
You have to put a space between the ')' and the 'return'
Re: help -
kevi11 - 16.03.2016
Don't go error 001: expected token: ")", but found "return"
Re: help -
saffierr - 16.03.2016
I can't see why it should return a error on that line...
Re: help -
kevi11 - 16.03.2016
PHP код:
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 */
Re: help -
saffierr - 16.03.2016
Oh wait, I see the error:
You forgot a ',' comma
PHP код:
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;
}
Re: help -
Vince - 16.03.2016
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.
Re: help -
saffierr - 16.03.2016
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.