Question about variable
#1

Quote:

players++;
print(players);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
players--;
print(players);
return 1;
}

Error :
Quote:

C:\Users\bosi\Desktop\lawl\Scripting 2\gamemodes\HotPursuit.pwn(337) : error 035: argument type mismatch (argument 1)
C:\Users\bosi\Desktop\lawl\Scripting 2\gamemodes\HotPursuit.pwn(344) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#2

Help please
Reply
#3

You missing "" in print.

print("players"); or printf("%d", players);
Reply
#4

Read the mutha' fuckin' forum rules before posting. http://forum.sa-mp.com/announcement.php?f=12

Now, had you of done a little research, you would of realized that the "print" function only handles strings. Since "players" is an integer and not a string, you cannot call print(players). However, you can use printf to format a string and print the value of the integer. The poster above me gave you an example of printf already.
Reply
#5

Quote:
Originally Posted by Th3_P4dr1n0
Посмотреть сообщение
You missing "" in print.

print("players"); or printf("%d", players);
Thanks!

Now I am getting another error

Quote:

C:\Users\bosi\Desktop\lawl\Scripting 2\gamemodes\HotPursuit.pwn(7) : fatal error 100: cannot read from file: "zcmd"

My zmcd fail is here.
Quote:

C:\Users\bosi\Desktop\lawl\Scripting 2\include

And should I write #include <zcmd> or #include <zcmd.inc>
Reply
#6

Search and you'll find your answer.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)