SA-MP Forums Archive
A New PROBLEM!!!! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A New PROBLEM!!!! (/showthread.php?tid=156673)



A New PROBLEM!!!! - Ihsan_Cingisiz - 23.06.2010

Hello, i edited this topic because i make very much new topics about stupid question
but here;s a new question too, this is my script and i my pawno compiler crashes when
it compile :
Quote:

public ShowLicenses(playerid);
{
new string[100];
new string1[100];
new string2[100];
new string3[100];
new guide = dini_Int(file, "HasGuide");
new dlic = dini_Int(file, "DriveLic");
new slic = dini_Int(file, "SailLic");
new flic = dini_Int(file, "FlyLic");
new glic = dini_Int(file, "GunLic");

format(string, sizeof(string), "Guide: [%s]", (guide == 1) ? ("Yes") : ("No"));
format(string1, sizeof(string1), "Driving License: [%s]", (dlic == 1) ? ("Yes") : ("No"));
format(string2, sizeof(string2), "Sailing License: [%s]", (slic == 1) ? ("Yes") : ("No"));
format(string3, sizeof(string3), "Weapon License: [%s]", (glic == 1) ? ("Yes") : ("No"));

SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "[====================| Stats Menu |====================]");
SendClientMessage(playerid, COLOR_LGREEN, string);
SendClientMessage(playerid, COLOR_LGREEN, string1);
SendClientMessage(playerid, COLOR_LGREEN, string2);
SendClientMessage(playerid, COLOR_LGREEN, string3);
SendClientMessage(playerid, COLOR_GREEN, "[====================| Stats Menu |====================]");

return 1;
}




Re: DJ Damnit back in da House, what's the fucking problem? - Jay. - 23.06.2010

Omg, Dude I've saw you've posted! 2 topics so far..

Will you just learn..


Re: DJ Damnit back in da House, what's the fucking problem? - Antonio [G-RP] - 23.06.2010

Don't make another fucking topic, use the same one.


Re: DJ Damnit back in da House, what's the fucking problem? - bigcomfycouch - 23.06.2010

Код:
SendClientMessage(playerid, COLOR_GREEN, "");
probably because you are sending null strings.


Re: DJ Damnit back in da House, what's the fucking problem? - Ihsan_Cingisiz - 23.06.2010

Quote:
Originally Posted by big comfy couch
Код:
SendClientMessage(playerid, COLOR_GREEN, "");
probably because you are sending null strings.
That's not the problem, i deleted that still crash


Re: DJ Damnit back in da House, what's the fucking problem? - Jofi - 23.06.2010

Maybe because:
pawn Код:
format(string2, sizeof(string2), "Guide: [%s] Driving License: [%s] Sailing License: [%s] Flying License: [%s] Weapon License: [%s]",(guide == 1) ? ("Yes") : ("No"), (dlic == 1) ? ("Yes") : ("No"));
Try whitout it does it work?
also you should use %d when there is number and %s when text..

And how about use like:
if(dlic == 1) { LicText = "Passed"; } else { LicText = "None"; }
then add "LicText" there...
also where is sailing, flying, weapon license?
(guide == 1) ? ("Yes") : ("No"), (dlic == 1) ? ("Yes") : ("No") <-- WTF

Script looks wierd


Re: A New PROBLEM!!!! - Ihsan_Cingisiz - 23.06.2010

Bump for the new topic