[PAWN] Tons of errors
#1

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.
Reply
#2

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.
Reply
#3

GivePlayerCash isn't a samp function? Have you created your own function?
Use GivePlayerMoney(playerid, 20000); instead.
Reply
#4

Thanks, stupid I didn't saw that, thank you guys very much!
Reply
#5

Actually I only did this at the top, because before it said GivePlayerCash was undefined:
Код:
new GivePlayerCash;
Reply
#6

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:
Код:
new NOPCheck;
Reply
#7

lol use this instead:
pawn Код:
stock GivePlayerCash(playerid, money)
{
    GivePlayerMoney(playerid,money);
}
Reply
#8

Anyone? ^
Reply
#9

pawn Код:
new NOPCheck[MAX_PLAYERS];
instead of
pawn Код:
new NOPCheck;
Reply
#10

Thanks for the help but, still the same errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)