[PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Hey guys, I got kind of a problem.
I was editting my gamemode and everything worked fine. Later i editted something.
And it gave me this errors:
Код:
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : error 012: invalid function call, not a valid address
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : warning 215: expression has no effect
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : warning 215: expression has no effect
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : error 001: expected token: ";", but found ")"
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : error 029: invalid expression, assumed zero
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(3030) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Here's the part of the script:
Код:
else if(gift == 7)
{
GivePlayerCash(giveplayerid, 20000); //ERROR LINE
SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $20,000!");
format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
I hope you guys can help me.
Re: [PAWN] Tons of errors -
Parallex - 31.05.2014
pawn Код:
else if(gift == 7)
{
GivePlayerMoney(giveplayerid, 20000); //ERROR LINE
SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $20,000!");
format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
It should be GivePlayerMoney instead of GivePlayerCash as GivePlayerCash is not a function - correct one for giving out cash is GivePlayerMoney.
Re: [PAWN] Tons of errors -
SyntaxQ - 31.05.2014
GivePlayerCash isn't a samp function? Have you created your own function?
Use GivePlayerMoney(playerid, 20000); instead.
Re: [PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Thanks, stupid I didn't saw that, thank you guys very much!
Re: [PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Actually I only did this at the top, because before it said GivePlayerCash was undefined:
Re: [PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Wait wait wait, It didn't worked, It gave me this error back:
Код:
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(4887) : error 012: invalid function call, not a valid address
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(4887) : warning 215: expression has no effect
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(4887) : error 001: expected token: ";", but found ")"
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(4887) : error 029: invalid expression, assumed zero
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(4887) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
ExecuteNOPAction(playerid)
{
new string[128];
new newcar = GetPlayerVehicleID(playerid);
if(NOPTrigger[playerid] >= MAX_NOP_WARNINGS) { return 1; }
NOPTrigger[playerid]++;
RemovePlayerFromVehicle(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z+2);
NOPCheck(playerid); //THIS LINE
if(NOPTrigger[playerid] > 1)
{
new sec = (NOPTrigger[playerid] * 5000)/1000-1;
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may be NOP hacking - restricted vehicle (model %d) for %d seconds.", GetPlayerNameEx(playerid), playerid, GetVehicleModel(newcar),sec);
ABroadCast(COLOR_YELLOW, string, 2);
}
return 1;
}
This is on the top of the script:
Re: [PAWN] Tons of errors -
Eth - 31.05.2014
lol use this instead:
pawn Код:
stock GivePlayerCash(playerid, money)
{
GivePlayerMoney(playerid,money);
}
Re: [PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Anyone? ^
Re: [PAWN] Tons of errors -
Eth - 31.05.2014
pawn Код:
new NOPCheck[MAX_PLAYERS];
instead of
Re: [PAWN] Tons of errors -
bradleyofniet - 31.05.2014
Thanks for the help but, still the same errors