meds fees error help +1rep
#1

i put meds fees system in my gm but i got 2 error


Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        new string[256];
	new mrand =random(5000);
	format(string, sizeof(string),"The hospital has charged you $%d for their medical services.",mrand);
	SendClientMessage(playerid,0xFF4500AA, string);
	GivePlayerMoney(playerid,-mrand);
and


Код:
C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(2615) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(2624) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#2

help me fast i need it
Reply
#3

Change new string[256]; name in something else
Reply
#4

something else? can u give me something else
Reply
#5

pls come fix this and fast and this is small error but i can't fix this i much try but not work can u come with team viewer fix it pls

493 840 792
9603
Reply
#6

This has been told so many times, do not give your strings 256 cells unless you really need it. The maximum length of a client message is 128. That warning means the variable string is already globally defined, so just remove

pawn Код:
new string[256];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)