SA-MP Forums Archive
Problems pros like you can solve! - 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: Problems pros like you can solve! (/showthread.php?tid=641778)



Problems pros like you can solve! - n00blek - 20.09.2017

i had 22 errors and a lot of warnings. i fixed almost everything except few. i really dont know what to do here. +rep when someone helps.
im gonna post line-line error-error thing

error
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(349) : warning 217loose indentation 
script part
http://prntscr.com/gniy8m


error
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(553) : error 001expected token"-identifier-"but found "(" 
script part
http://prntscr.com/gniytp


error
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(661) : error 021symbol already defined"CreateObject" 
script part
http://prntscr.com/gnizb3

error
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(899) : error 029invalid expressionassumed zero 
script part
http://prntscr.com/gnj02o

last error
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(907) : warning 202number of arguments does not match definition 
and last script part
http://prntscr.com/gnj0o1

3 +reps for helpers. <3


Re: [+REP]Problems pros like you can solve! - n00blek - 20.09.2017

Im in hurry pls. <3


Re: [+REP]Problems pros like you can solve! - FailerZ - 20.09.2017

The first is just a warning just remove the tab before the new variable

The last one you should remove that colon at the end of if(dialogid==.......): it is wrong syntax.

Do that I will look for the rest


Re: [+REP]Problems pros like you can solve! - TahaMhr - 20.09.2017

Quote:

C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(349) : warning 217: loose indentation

It's a warning, and to remove that warning, remove 1 tab space from the upper line, example pic:


for the second one you missed ";", use this instead:
public OnGameModeInit();

for the forth, remove that ":", use:
if(dialogid == UBACI)

for the fifth one, i guess its because of that ", name"
try removing the ",name" but im not sure if this is the reason or not.

no idea why third one is caused.


Re: [+REP]Problems pros like you can solve! - FailerZ - 20.09.2017

Quote:
Originally Posted by TahaMhr
Посмотреть сообщение
for the second one you missed ";", use this instead:
public OnGameModeInit();
Nope, That is wrong bro. It is fine as it is.


Re: [+REP]Problems pros like you can solve! - n00blek - 20.09.2017

thanks failerz and tahamhr for help
however still got third and 2ndone
i tried commenting CreateObject and it threw errors on the next one. what is solution?
is there a way to make txt file and kind of import that file via commands to use less space?
http://prntscr.com/gnk766


Re: [+REP]Problems pros like you can solve! - n00blek - 20.09.2017

and when i tried to delete createobject part it said. invalid function or declaration on line 611


Re: Problems pros like you can solve! - FailerZ - 20.09.2017

You might need to check for missing brackets


Re: Problems pros like you can solve! - Kraeror - 20.09.2017

First solution: Remove one of the tabs(This is just warning, so server can be runned with a lot of warnings)!
Fourth solution: remove the ":" in the end of the line
Last solution: just use it:
Quote:

new TheString[256];
format(TheString, sizeof(TheString), "[RMT:RP]: Odbio si poziv za organizaciju %s",name);
SCM(playerid,COLOR_RED,TheString);




Re: Problems pros like you can solve! - n00blek - 20.09.2017

nope nothing is missing. a question: should ongameinit return a value or should i put void before ongamemodeinit?