Raised This Month: $12 Target: $400
 3% 

JailBreak native


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mirk
Senior Member
Join Date: Nov 2012
Old 02-12-2015 , 17:41   JailBreak native
Reply With Quote #1

Hello all, I made native of JailBreak mode (by Pastout), but I have little error and I don't know solve it.

Code:
public jbm_get_admin_mod(bool:iMod)
{
	new box, snowball, gungame;
	
	switch(iMod)
	{
		case box: return g_bBoxMatch;
		case snowball: return g_bSnowballWar;
		case gungame: return g_bGunGame;
	}
	
	return 0;
}

Last edited by Mirk; 02-12-2015 at 17:42.
Mirk is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-12-2015 , 18:33   Re: JailBreak native
Reply With Quote #2

What are the errors?
zmd94 is offline
Mirk
Senior Member
Join Date: Nov 2012
Old 02-12-2015 , 19:22   Re: JailBreak native
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
What are the errors?
At the box, gungame and snowball:
error 008: must be a constant expression; assumed zero
Mirk is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-12-2015 , 19:25   Re: JailBreak native
Reply With Quote #4

Just try to change this:
Code:
public jbm_get_admin_mod(bool:iMod)
{
    new box, snowball, gungame;
    
    switch(iMod)
    {
        case box: return g_bBoxMatch;
        case snowball: return g_bSnowballWar;
        case gungame: return g_bGunGame;
    }
    
    return 0;
}
-->
Code:
public jbm_get_admin_mod(bool:iMod)
{
    new box, snowball, gungame;
    
    if(iMod == box)
    {
        return g_bBoxMatch;
    }
    else if(snowball == box)
    {
        return g_bSnowballWar;
    }
    else if(gungame == box)
    {
        return g_bGunGame;
    }
}
zmd94 is offline
Mirk
Senior Member
Join Date: Nov 2012
Old 02-12-2015 , 19:33   Re: JailBreak native
Reply With Quote #5

The same error

PHP Code:
public jbm_get_admin_mod(bool:iMod)
{
    new 
boxsnowballgungame;
    
    if(
iMod == box)
    {
        return 
g_bBoxMatch;
    }
    else if(
iMod == snowball)
    {
        return 
g_bSnowballWar;
    }
    else if(
iMod == gungame)
    {
        return 
g_bGunGame;
    }
    
    return 
0;

Mirk is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-12-2015 , 19:39   Re: JailBreak native
Reply With Quote #6

Then, I'm sorry. I'm not sure how to fix the problem.
zmd94 is offline
Mirk
Senior Member
Join Date: Nov 2012
Old 02-13-2015 , 01:04   Re: JailBreak native
Reply With Quote #7

Quote:
Originally Posted by zmd94 View Post
Then, I'm sorry. I'm not sure how to fix the problem.
Never mind, thank you for your willingness
Mirk is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 02-13-2015 , 05:03   Re: JailBreak native
Reply With Quote #8

remove bool:
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Mirk
Senior Member
Join Date: Nov 2012
Old 02-13-2015 , 05:57   Re: JailBreak native
Reply With Quote #9

Quote:
Originally Posted by OnePL View Post
remove bool:
The same error..
Mirk is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 02-13-2015 , 08:25   Re: JailBreak native
Reply With Quote #10

better to do so:

PHP Code:
enum {
    
Boxing 0,
    
SnowBall,
    
GunGame
}

public 
jbe_get_admin_mode(iMod) {
    switch(
iMod) {
        case 
Boxing: return g_bBoxMatch
        
case SnowBall: return g_bSnowBallWar
        
case GunGame: return g_bGunGame
    
}
    return 
0

or

PHP Code:
enum {
    
Boxing 0,
    
SnowBall,
    
GunGame
}

public 
jbe_get_admin_mode(iMod) return iMod == Boxing g_bBoxMatch iMod == SnowBall g_bSnowBallWar iMod == GunGame g_bGunGame 
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode