#1

Can you see whats wrong here?

Код:
../gamemodes/OnCommand.pwn(23562) : error 017: undefined symbol "string"
../gamemodes/OnCommand.pwn(23562) : warning 215: expression has no effect
../gamemodes/OnCommand.pwn(23562) : error 001: expected token: ";", but found "]"
../gamemodes/OnCommand.pwn(23562) : error 029: invalid expression, assumed zero
../gamemodes/OnCommand.pwn(23562) : fatal error 107: too many error messages on one line
PHP код:
}
COMMAND:radiospawn2(playeridparams[])
{
    
string[1000];
    for(new 
x;x<sizeof(RadioObjects);x++)
     {
          
format(stringsizeof(string), "%s%s\n"stringRadioObjects[x][radioname]);
    }
    
DestroyFurnitureSelectionMenu(playerid);
    
SetPVarInt(playerid"furnc_active"1);
    
CreateFurnitureSelectionMenu(playerid);
    
SelectTextDraw(playerid0xACCBF1FF);
    return 
1;

Reply
#2

try this
PHP код:

COMMAND
:radiospawn2(playeridparams[]) 

    new 
string[1000]; 
    for(new 
x;x<sizeof(RadioObjects);x++) 
     { 
          
format(stringsizeof(string), "%s%s\n"stringRadioObjects[x][radioname]); 
    } 
    
DestroyFurnitureSelectionMenu(playerid); 
    
SetPVarInt(playerid"furnc_active"1); 
    
CreateFurnitureSelectionMenu(playerid); 
    
SelectTextDraw(playerid0xACCBF1FF); 
    return 
1

Reply
#3

Quote:
Originally Posted by Mister0
Посмотреть сообщение
try this
PHP код:

COMMAND
:radiospawn2(playeridparams[]) 

    new 
string[1000]; 
    for(new 
x;x<sizeof(RadioObjects);x++) 
     { 
          
format(stringsizeof(string), "%s%s\n"stringRadioObjects[x][radioname]); 
    } 
    
DestroyFurnitureSelectionMenu(playerid); 
    
SetPVarInt(playerid"furnc_active"1); 
    
CreateFurnitureSelectionMenu(playerid); 
    
SelectTextDraw(playerid0xACCBF1FF); 
    return 
1

Did you even change anything?
Reply
#4

yes, you don't create the string vector, you have this
string[1000];
and I chaged in this
new string[1000];

if you don't put "new" before the name of string, the variable don't create
Reply
#5

Quote:
Originally Posted by Mister0
Посмотреть сообщение
yes, you don't create the string vector, you have this
string[1000];
and I chaged in this
new string[1000];

if you don't put "new" before the name of string, the variable don't create
Lol now i feel so dumb hahah i just missed to put new LOL!
Reply
#6

Good look, next time be more carreful
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)