SA-MP Forums Archive
Help - 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)
+--- Thread: Help (/showthread.php?tid=601791)



Help - Hellman92 - 26.02.2016

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;




Re: Help - Mister0 - 26.02.2016

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




Re: Help - Hellman92 - 26.02.2016

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?


Re: Help - Mister0 - 26.02.2016

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


Re: Help - Hellman92 - 26.02.2016

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!


Re: Help - Mister0 - 26.02.2016

Good look, next time be more carreful