SA-MP Forums Archive
Why this feature doesnt work??? - 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: Why this feature doesnt work??? (/showthread.php?tid=357753)



Why this feature doesnt work??? - pasha97 - 08.07.2012

I have a bot amde by me on server, but when i upload server on hosting with linux this part doesnt work:

pawn Код:
if(dini_Isset("ZASystem/BillyBot.sav",bottext2))
{
format(str,sizeof(str),"{00ff00}BillyBot: {ffffff}%s",dini_Get("ZAsystem/BillyBot.sav",bottext2));
SendClientMessageToAll(0x00FF00FF, str);
return 1;
}
On homehost it works fine and sends to chat message of bot written in a file,like: "Billybot: Hi!" but on hosting it just sends: "Billybot: "


Re: Why this feature doesnt work??? - pasha97 - 08.07.2012

hmmm, do you all really so lazzy to suggest something?


Re: Why this feature doesnt work??? - clarencecuzz - 08.07.2012

Try something like this:
pawn Код:
if(dini_Isset("ZASystem/BillyBot.sav",bottext2))
{
new BotMsg[160]; //Change 160 to whatever string size you require.
BotMsg = dini_Get("ZAsystem/BillyBot.sav",bottext2);
format(str,sizeof(str),"BillyBot: {ffffff}%s",BotMsg);
SendClientMessageToAll(0x00FF00FF, str);
return 1;
}
Not sure if that would completely work, but it would work better than having dini_Get(... in it's place.


Re: Why this feature doesnt work??? - pasha97 - 08.07.2012

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
Try something like this:
pawn Код:
if(dini_Isset("ZASystem/BillyBot.sav",bottext2))
{
new BotMsg[160]; //Change 160 to whatever string size you require.
BotMsg = dini_Get("ZAsystem/BillyBot.sav",bottext2);
format(str,sizeof(str),"BillyBot: {ffffff}%s",BotMsg);
SendClientMessageToAll(0x00FF00FF, str);
return 1;
}
Not sure if that would completely work, but it would work better than having dini_Get(... in it's place.
no, it still doesnt work on hosting and still works only at homehost. I think dini is not comparitible with linux servers


Re: Why this feature doesnt work??? - clarencecuzz - 08.07.2012

lol it should. You sure you uploaded/created the right directories to your hosting server?


Re: Why this feature doesnt work??? - pasha97 - 08.07.2012

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
lol it should. You sure you uploaded/created the right directories to your hosting server?
yes i am completely shure!!!!! You see, dini_Isset works fine with this directory, but when we use dini_Get it gets empty string.


Re: Why this feature doesnt work??? - pasha97 - 08.07.2012

maybe there is another way to do this without dini_get?


Re: Why this feature doesnt work??? - Vince - 08.07.2012

Quote:
Originally Posted by pasha97
Посмотреть сообщение
hmmm, do you all really so lazzy to suggest something?
Yeah, because everyone is online 24/7 to answers your question within 30 minutes. Seriously, grow up.

On topic: Linux uses case sensitive file names. One letter off and it won't work.


Re: Why this feature doesnt work??? - pasha97 - 08.07.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Yeah, because everyone is online 24/7 to answers your question within 30 minutes. Seriously, grow up.

On topic: Linux uses case sensitive file names. One letter off and it won't work.
dude, understand, i need help! Im really confused because i wanted to sop working on server for this summer, but this bug makes me busy. And i know about case sensivity, and i use all leters right


Re: Why this feature doesnt work??? - clarencecuzz - 08.07.2012

Can't you just put a bot message into your script rather than having it in a saved file?