Raised This Month: $37 Target: $400
 9% 

[CS GO] problem with Enum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 01-13-2019 , 07:46   [CS GO] problem with Enum
Reply With Quote #1

hi guys!
i need Enum new syntax for this cod:
PHP Code:
#pragma newdecls required

enum Premios
{
    
String:Nombre[64],
    
precio,
    
quien
}

    
int GetSizeArrayPremiosClon GetArraySize(array_premios_clon);
    
int[] Items = new int[GetSizeArrayPremiosClon][Premios]; // error 
thank you
Dr.Mohammad is offline
arcticx2
Member
Join Date: Nov 2011
Old 01-13-2019 , 09:46   Re: [CS GO] problem with Enum
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=244092

maybe google first , then use search option from the forum , then if there were no luck finding it then post it :-? sounds good right ?
arcticx2 is offline
impossible_cc
Member
Join Date: Sep 2018
Location: Ukraine
Old Yesterday , 08:23   Re: [CS GO] problem with Enum
Reply With Quote #3

Quote:
Originally Posted by Dr.Mohammad View Post
hi guys!
i need Enum new syntax for this cod:
PHP Code:
#pragma newdecls required

enum Premios
{
    
String:Nombre[64],
    
precio,
    
quien
}

    
int GetSizeArrayPremiosClon GetArraySize(array_premios_clon);
    
int[] Items = new int[GetSizeArrayPremiosClon][Premios]; // error 
thank you
I do not think that you can convert this code to new syntax easily, but you can try to use enum structs for that

Last edited by impossible_cc; Yesterday at 08:23.
impossible_cc is online now
Ilusion9
Senior Member
Join Date: Jun 2018
Location: Romania
Old Yesterday , 09:59   Re: [CS GO] problem with Enum
Reply With Quote #4

PHP Code:
#pragma newdecls required

enum struct Premios
{
    
char Nombre[65];
    
int precio// int or char ???
    
int quien // int or char ???
}

    
Premios[] Items = new Premios[array_premios_clon.Length]; // error 
I don't know if you can create a dynamic struct.
__________________
Ilusion9 is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old Yesterday , 13:42   Re: [CS GO] problem with Enum
Reply With Quote #5

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:
#pragma newdecls required

enum struct Premios
{
    
char Nombre[65];
    
int precio// int or char ???
    
int quien // int or char ???
}

    
Premios[] Items = new Premios[array_premios_clon.Length]; // error 
I don't know if you can create a dynamic struct.
Quote:
Originally Posted by impossible_cc View Post
I do not think that you can convert this code to new syntax easily, but you can try to use enum structs for that
thank you.
can you see this links and fix??
1.https://github.com/Franc1sco/Franug-...ilbreak.sp#L27
HTML Code:
enum struct Premios
{
	char Nombre[65];
	int precio, // int or char ???
	int quien // int or char ???
}
2.https://github.com/Franc1sco/Franug-...lbreak.sp#L268
HTML Code:
Premios[] Items = new Premios[array_premios_clon.Length]; // error

Last edited by Dr.Mohammad; Yesterday at 13:43.
Dr.Mohammad is offline
impossible_cc
Member
Join Date: Sep 2018
Location: Ukraine
Old Today , 18:50   Re: [CS GO] problem with Enum
Reply With Quote #6

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:
    Premios[] Items = new Premios[array_premios_clon.Length]; // error 
I don't know if you can create a dynamic struct.
I hope you can, otherwise it's broken, or at least weird.


Quote:
Originally Posted by Dr.Mohammad View Post
thank you.
can you see this links and fix??
1.https://github.com/Franc1sco/Franug-...ilbreak.sp#L27
HTML Code:
enum struct Premios
{
	char Nombre[65];
	int precio, // int or char ???
	int quien // int or char ???
}
2.https://github.com/Franc1sco/Franug-...lbreak.sp#L268
HTML Code:
Premios[] Items = new Premios[array_premios_clon.Length]; // error
If no one will do that, I will have free time in about 20-22 h and I will help you with that.
impossible_cc is online now
Reply


Thread Tools
Display Modes

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 19:49.


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