How to increase rather than set?
#1

How do i increase

PlayerInfo[playerid][Minutes]

Rather than set?

Like: +1
Reply
#2

++
Reply
#3

Код:
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(152) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(152) : warning 215: expression has no effect
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(153) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Torran\Desktop\tRoleplay\filterscripts\tadmin.pwn(153) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
PlayerInfo[killerid][Kills] ++1;
  PlayerInfo[playerid][Deaths] ++1;
Reply
#4

without the 1

as i said

just ++
Reply
#5

and youll probably need to return the value

return variable++
Reply
#6

Quote:
Originally Posted by adsy
and youll probably need to return the value

return variable++
why would he have to return something like
Код:
PlayerInfo[playerid][Deaths] ++;
?
Reply
#7

i dont know the context

if its within a function and your calling the function to send back the data then you need to return the data that you want the function to give you.

if not then dont return it.
Reply
#8

This:
Код:
PlayerInfo[playerid][Minutes] += 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)