Mirage Source
cheaking someones fraction - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: cheaking someones fraction (/showthread.php?tid=2210)



cheaking someones fraction - zidsal - 30-09-2008

well I've been bored so I've been working on a pvp based game everything is working so far except for my function to cheak someones fraction. I'm sorry to bother people but would anyone mind helping me find whats wrong with it?

Code:
Function getplayerfraction(ByVal Index) As Long
Dim getfraction As integer
getfraction = GetVar(App.Path & "\fraction.ini", "fraction choice", GetPlayerName(Index))
End Function

thanks
zidsal


Re: cheaking someones fraction - Vahz - 30-09-2008

no need for declare "getfraction as integer"

just make it like this

Code:
Function getplayerfraction(ByVal Index) As Long
getplayerfraction = CLng(GetVar(App.Path & "\fraction.ini", "fraction choice", GetPlayerName(Index)))
End Function

hope this help.


Re: cheaking someones fraction - zidsal - 30-09-2008

thanks very much for the help but unfortunatly it didn't work Sad


Re: cheaking someones fraction - Robin - 01-10-2008

It's a faction, not a fraction.


Re: cheaking someones fraction - Kousaten - 01-10-2008

*checks Robin's fraction*

Ohh... so you divide by three, eh?


Re: cheaking someones fraction - Mattyw - 01-10-2008

Robin Wrote:It's a faction, not a fraction.

Exactly what I was thinking. But I though,t I'll let him make a mistake, he'll find out eventually. ;D