How to increase rather than set? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to increase rather than set? (
/showthread.php?tid=134270)
How to increase rather than set? -
Torran - 15.03.2010
How do i increase
PlayerInfo[playerid][Minutes]
Rather than set?
Like:
+1
Re: How to increase rather than set? -
adsy - 15.03.2010
++
Re: How to increase rather than set? -
Torran - 15.03.2010
Код:
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;
Re: How to increase rather than set? -
adsy - 15.03.2010
without the 1
as i said
just ++
Re: How to increase rather than set? -
adsy - 15.03.2010
and youll probably need to return the value
return variable++
Re: How to increase rather than set? -
cessil - 16.03.2010
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] ++;
?
Re: How to increase rather than set? -
adsy - 16.03.2010
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.
Re: How to increase rather than set? -
Zimon95 - 16.03.2010
This:
Код:
PlayerInfo[playerid][Minutes] += 1;